-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
35 lines (26 loc) · 866 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM pytorch/pytorch
# Needed to avoid debconf Display errors
ENV DEBIAN_FRONTEND noninteractive
# System Dependencies
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
python-pip
RUN pip install cython
RUN /opt/conda/bin/conda install numpy pyyaml scipy ipython mkl mkl-include && \
/opt/conda/bin/conda install -c pytorch magma-cuda90 && \
/opt/conda/bin/conda clean -ya
# Add repo to container
ADD . /opt/paysage
# Install dependencies
RUN pip install --upgrade pip
RUN pip install --ignore-installed -r /opt/paysage/requirements.txt
# Install pytorch
# (torch wheel already included in pytorch docker image)
RUN pip install torchvision
# Install paysage
RUN pip install -e /opt/paysage/
# Download MNIST
RUN python /opt/paysage/examples/mnist/download_mnist.py
# Test
CMD pytest /opt/paysage/test/test_backends.py