-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
59 lines (48 loc) · 1.63 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM nvidia/cuda:9.0-base-ubuntu16.04
LABEL maintainer="Seyoung Park <[email protected]>"
# This Dockerfile is forked from Tensorflow Dockerfile
# Pick up some PyTorch gpu dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cuda-command-line-tools-9-0 \
cuda-cublas-9-0 \
cuda-cufft-9-0 \
cuda-curand-9-0 \
cuda-cusolver-9-0 \
cuda-cusparse-9-0 \
curl \
libcudnn7=7.1.4.18-1+cuda9.0 \
libfreetype6-dev \
libhdf5-serial-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python \
python-dev \
rsync \
software-properties-common \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install miniconda
RUN apt-get update && apt-get install -y --no-install-recommends \
wget && \
MINICONDA="Miniconda3-latest-Linux-x86_64.sh" && \
wget --quiet https://repo.continuum.io/miniconda/$MINICONDA && \
bash $MINICONDA -b -p /miniconda && \
rm -f $MINICONDA
ENV PATH /miniconda/bin:$PATH
# Install PyTorch
RUN conda update -n base conda && \
conda install pytorch torchvision cuda90 -c pytorch
# Install PerceptualSimilarity dependencies
RUN conda install numpy scipy jupyter matplotlib && \
conda install -c conda-forge scikit-image && \
apt-get install -y python-qt4 && \
pip install opencv-python
# For CUDA profiling, TensorFlow requires CUPTI. Maybe PyTorch needs this too.
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
# IPython
EXPOSE 8888
WORKDIR "/notebooks"