Skip to content

Commit db574c0

Browse files
committed
update cuda version 10.1
1 parent a23f91e commit db574c0

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
FROM lablup/common-base:20.05-py36-cuda10.1
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV PYTORCH_VERSION=1.3.1
5+
ENV TORCHVISION_VERSION=0.5.0
6+
ENV TORCHAUDIO_VERSION=0.4.0
7+
ENV TORCHTEXT_VERSION=0.5.0
8+
ENV TENSORBOARDX_VERSION=1.9
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
11+
12+
ENV PYTHONUNBUFFERED=1 \
13+
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
14+
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin/mecab" \
15+
LANG=C.UTF-8
16+
17+
# Set default shell to /bin/bash
18+
SHELL ["/bin/bash", "-cu"]
19+
20+
# Install TensorFlow, Keras, PyTorch and MXNet
21+
RUN python3 -m pip install pip --no-cache-dir -Iv \
22+
Cython==0.29.13 \
23+
numpy==1.16.5 \
24+
scipy==1.4.1 \
25+
scikit-image==0.16.2 \
26+
scikit-learn==0.21.3 \
27+
matplotlib==3.1.3 \
28+
tornado==6.0.4 \
29+
pystan==2.19.1.1 \
30+
notebook==6.0.3
31+
32+
RUN python3 -m pip install pip --no-cache-dir \
33+
pandas==1.0.1 \
34+
https://download.pytorch.org/whl/cu101/torch-${PYTORCH_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
35+
https://download.pytorch.org/whl/cu101/torchvision-${TORCHVISION_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
36+
https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp36-cp36m-linux_x86_64.whl \
37+
torchtext==${TORCHTEXT_VERSION} && \
38+
python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
39+
40+
RUN python3 -m pip install pip --no-cache-dir \
41+
jupyter-tensorboard==0.2.0 \
42+
tensorwatch==0.8.10 \
43+
jupyterlab-nvdashboard==0.2.0
44+
45+
# Install Horovod, temporarily using CUDA stubs
46+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
47+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
48+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
49+
pip install --no-cache-dir horovod==0.19.2 && \
50+
# pip install --no-cache-dir git+https://github.com/horovod/horovod && \
51+
ldconfig
52+
53+
RUN python3 -m pip install --no-cache-dir \
54+
mpi4py==3.0.3 \
55+
nni
56+
57+
# Install ipython kernelspec
58+
Run python3 -m ipykernel install --display-name "PyTorch 1.3 on Python 3.6 (CUDA 10.1)" && \
59+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
60+
61+
# Backend.AI specifics
62+
LABEL ai.backend.kernelspec="1" \
63+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
64+
ai.backend.features="batch query uid-match user-input" \
65+
ai.backend.base-distro="ubuntu16.04" \
66+
ai.backend.resource.min.cpu="1" \
67+
ai.backend.resource.min.mem="1g" \
68+
ai.backend.resource.min.cuda.device=0 \
69+
ai.backend.resource.min.cuda.shares=0 \
70+
ai.backend.runtime-type="python" \
71+
ai.backend.runtime-path="/usr/bin/python3" \
72+
ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006,jupyter:http:8080,jupyterlab:http:8090"
73+
74+
WORKDIR /home/work
75+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)