Skip to content

Commit 0ffb6dc

Browse files
committed
Lablup FF 20.07 with Python 3.6 & CUDA 10.1
1 parent 7c9cfa8 commit 0ffb6dc

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
FROM lablup/common-base:20.07-py36-cuda10.1
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV TENSORFLOW_VERSION=2.2.0
5+
ENV PYTORCH_VERSION=1.5.0
6+
ENV TORCHVISION_VERSION=0.6.0
7+
ENV TORCHAUDIO_VERSION=0.5.0
8+
ENV TORCHTEXT_VERSION=0.6.0
9+
ENV TENSORBOARDX_VERSION=1.9
10+
ENV MXNET_VERSION=1.5.1
11+
ARG CUDA=10.1
12+
ARG LIBNVINFER=6.0.1-1
13+
ARG LIBNVINFER_MAJOR_VERSION=6
14+
ENV CUDNN_VERSION=7.6.5.32-1+cuda10.1
15+
ENV NCCL_VERSION=2.7.3-1+cuda10.1
16+
ENV DEBIAN_FRONTEND=noninteractive
17+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
18+
ENV MPLBACKEND=Svg
19+
ENV PYTHONUNBUFFERED=1 \
20+
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
21+
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" \
22+
LANG=C.UTF-8
23+
24+
# Set default shell to /bin/bash
25+
SHELL ["/bin/bash", "-cu"]
26+
27+
RUN python3 -m pip install --no-cache-dir --upgrade \
28+
gast==0.2.2 \
29+
'httplib2<0.18.0,>=0.8' \
30+
'coverage<5.0,>=4.5' \
31+
'mock<4.0,>=3.0' \
32+
tensorflow==${TENSORFLOW_VERSION} \
33+
tensorboard==2.2.2
34+
35+
RUN python3 -m pip install --no-cache-dir --upgrade \
36+
-q git+https://github.com/google-research/tensorflow_constrained_optimization
37+
RUN python3 -m pip install --no-cache-dir --upgrade \
38+
-q git+https://github.com/tensorflow/fairness-indicators
39+
RUN python3 -m pip install --no-cache-dir \
40+
cachetools==3.1.0 \
41+
tensorflow-transform==0.22.0 \
42+
tensorflow_model_analysis==0.22.2 \
43+
ngraph-tensorflow-bridge==0.18.0 \
44+
tensorflow-metadata==0.22.2 \
45+
tensorflow-datasets==3.1.0 \
46+
tensorflow_probability \
47+
tensorflow-addons==0.10.0 \
48+
neural-structured-learning==1.1.0 \
49+
tensorflow-model-optimization==0.3.0
50+
RUN python3 -m pip install --no-cache-dir \
51+
tfx==0.22.0 \
52+
tfx-bsl==0.22.0 \
53+
tf-agents==0.5.0
54+
RUN python3 -m pip install --no-cache-dir \
55+
tensorflow_constrained_optimization \
56+
tensorflow-hub==0.8.0 \
57+
tensorflow_text==2.2.1 \
58+
tensorflow-graphics-gpu==1.0.0 \
59+
tensorflow-gan==2.0.0 \
60+
tensorflow-data-validation==0.22.0
61+
RUN python3 -m pip install --no-cache-dir \
62+
jupyter-tensorboard==0.2.0 \
63+
tensorflow-plot==0.3.2 \
64+
tensorflow-lattice==2.0.5 \
65+
tensorflow_ranking==0.3.1 \
66+
tensorflow-compression==1.3 \
67+
tensor2tensor \
68+
mesh-tensorflow==0.1.13 \
69+
tensorwatch==0.9.1 \
70+
tensorflow-io==0.13.0 \
71+
jupyterlab-nvdashboard==0.3.1
72+
73+
RUN python3 -m pip install pip --no-cache-dir \
74+
https://download.pytorch.org/whl/cu101/torch-${PYTORCH_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
75+
https://download.pytorch.org/whl/cu101/torchvision-${TORCHVISION_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
76+
https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp36-cp36m-linux_x86_64.whl \
77+
torchtext==${TORCHTEXT_VERSION} && \
78+
python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
79+
80+
RUN python3 -m pip install --no-cache-dir mxnet-cu101==${MXNET_VERSION}
81+
82+
# Install Horovod, temporarily using CUDA stubs
83+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
84+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
85+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_MXNET=1 \
86+
pip install --no-cache-dir horovod==0.19.4 && \
87+
ldconfig
88+
89+
RUN python3 -m pip install --no-cache-dir --upgrade \
90+
mpi4py==3.0.3 \
91+
nni==1.6 \
92+
scikit-nni==0.2.1
93+
94+
# Install ipython kernelspec
95+
Run python3 -m ipykernel install --display-name "Lablup FF 20.07 on Python 3.6 (CUDA 10.1)" && \
96+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
97+
98+
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
99+
jupyter nbextension enable --py tensorflow_model_analysis
100+
101+
# Backend.AI specifics
102+
LABEL ai.backend.kernelspec="1" \
103+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
104+
ai.backend.features="batch query uid-match user-input" \
105+
ai.backend.base-distro="ubuntu16.04" \
106+
ai.backend.resource.min.cpu="1" \
107+
ai.backend.resource.min.mem="1g" \
108+
ai.backend.resource.min.cuda.device=0 \
109+
ai.backend.resource.min.cuda.shares=0 \
110+
ai.backend.runtime-type="python" \
111+
ai.backend.runtime-path="/usr/bin/python3" \
112+
ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006,jupyter:http:8080,jupyterlab:http:8090,mne:http:5000"
113+
114+
WORKDIR /home/work
115+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)