Skip to content

Commit 0153f52

Browse files
committed
Pytorch 1.4 for python 3.6 & CUDA 10
1 parent b98f6bd commit 0153f52

File tree

1 file changed

+8
-71
lines changed

1 file changed

+8
-71
lines changed
Lines changed: 8 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,17 @@
1-
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
2-
MAINTAINER Mario Cho "[email protected]"
3-
4-
ENV LANG=C.UTF-8
5-
ENV PYTHONUNBUFFERED 1
6-
ENV CUDA_VERSION 10.0.130
7-
ENV CUDA_PKG_VERSION 10-0=$CUDA_VERSION-1
8-
ENV CUDNN_VERSION 7.6.4.38
9-
ENV NCCL_VERSION 2.4.8
10-
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/nvidia/lib64" \
11-
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
12-
ENV DEBIAN_FRONTEND=noninteractive
1+
# Lablup/Python-PyTorch 1.4 Python 3.6, CUDA10.0
132

14-
RUN apt-get update && \
15-
apt-get install -y \
16-
ca-certificates \
17-
wget curl git-core \
18-
vim-tiny zip unzip \
19-
python3 python3-pip \
20-
libssl-dev \
21-
libmpdec2 \
22-
proj-bin libproj-dev \
23-
libgeos-dev libgeos++-dev \
24-
mime-support \
25-
gcc g++ \
26-
&& \
27-
apt-get clean && \
28-
rm -rf /var/lib/apt/lists/
3+
FROM lablup/common-base:19.09-py36-cuda10
4+
MAINTAINER Mario Cho "[email protected]"
295

306
ENV PYTHONUNBUFFERED=1 \
317
LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/nvidia/lib64" \
328
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
339
LANG=C.UTF-8
3410

35-
# Install CUDA-10.0 + cuDNN 7.4
36-
RUN ln -s /usr/local/cuda-10.0 /usr/local/cuda && \
37-
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.0 /usr/local/cuda/lib64/libcudnn.so && \
38-
ldconfig
39-
40-
RUN apt-get update && apt-get install -y --no-install-recommends \
41-
cuda-libraries-$CUDA_PKG_VERSION \
42-
cuda-cublas-10-0 \
43-
libnccl2=2.4.8-1+cuda10.0 && \
44-
apt-mark hold libnccl2 && \
45-
rm -rf /var/lib/apt/lists/*
46-
47-
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
48-
python3 -m pip install --no-cache-dir -U setuptools && \
49-
python3 -m pip install --no-cache-dir wheel && \
50-
python3 -m pip install --no-cache-dir pyzmq simplejson msgpack-python uvloop && \
51-
python3 -m pip install --no-cache-dir aiozmq dataclasses tabulate && \
52-
python3 -m pip install --no-cache-dir namedlist six "python-dateutil>=2" && \
53-
python3 -m pip install --no-cache-dir h5py && \
54-
python3 -m pip install --no-cache-dir Cython && \
55-
python3 -m pip install --no-cache-dir numpy scipy && \
56-
python3 -m pip install --no-cache-dir versioneer==0.17 && \
57-
python3 -m pip install --no-cache-dir pyproj Cartopy==0.16 && \
58-
python3 -m pip install --no-cache-dir matplotlib bokeh && \
59-
python3 -m pip install --no-cache-dir pandas && \
60-
python3 -m pip install --no-cache-dir seaborn && \
61-
python3 -m pip install --no-cache-dir pillow && \
62-
python3 -m pip install --no-cache-dir networkx cvxpy && \
63-
python3 -m pip install --no-cache-dir scikit-learn scikit-image && \
64-
python3 -m pip install --no-cache-dir pygments && \
65-
python3 -m pip install --no-cache-dir torch==1.4 && \
66-
python3 -m pip install --no-cache-dir torchvision && \
67-
python3 -m pip install --no-cache-dir tensorwatch && \
68-
python3 -m pip install --no-cache-dir ipython && \
69-
python3 -m pip install --no-cache-dir jupyter && \
70-
python3 -m pip install --no-cache-dir jupyterlab && \
71-
rm -rf /root/.cache && \
72-
rm -f /tmp/*.whl
7311
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
7412

7513
# Install ipython kernelspec
76-
RUN python -m ipykernel install --display-name "PyTorch 1.4 on Python 3.6 (CUDA 10.0)" && \
14+
RUN python3 -m ipykernel install --display-name "PyTorch 1.4 on Python 3.6 (CUDA 10.0)" && \
7715
cat /usr/local/share/jupyter/kernels/python3/kernel.json
7816

7917
# Backend.AI specifics
@@ -86,9 +24,8 @@ LABEL ai.backend.kernelspec="1" \
8624
ai.backend.resource.min.cuda.device=1 \
8725
ai.backend.resource.min.cuda.shares=0.1 \
8826
ai.backend.runtime-type="python" \
89-
ai.backend.runtime-path="/usr/bin/python" \
90-
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,jupyterlab:http:8090,tensorboard:http:6006"
91-
92-
COPY policy.yml /etc/backend.ai/jail/policy.yml
27+
ai.backend.runtime-path="/usr/bin/python3" \
28+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8070,jupyterlab:http:8090"
9329

94-
# vim: ft=dockerfile
30+
WORKDIR /home/work
31+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)