Skip to content

Commit 9a078d9

Browse files
committed
Tensorflow 2.2 python 3.6 & CUDA 10.1
1 parent 9e637f7 commit 9a078d9

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
FROM lablup/common-base:20.03-py36-cuda10.1
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV TENSORFLOW_VERSION=2.2.0
5+
#ARG CUDA=10.1
6+
#ARG LIBNVINFER=6.0.1-1
7+
#ARG LIBNVINFER_MAJOR_VERSION=6
8+
#ENV CUDNN_VERSION=7.6.4.38-1+cuda10.1
9+
#ENV NCCL_VERSION=2.4.8-1+cuda10.1
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
12+
13+
ENV PYTHONUNBUFFERED=1 \
14+
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
15+
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" \
16+
LANG=C.UTF-8
17+
18+
# Set default shell to /bin/bash
19+
SHELL ["/bin/bash", "-cu"]
20+
21+
RUN python3 -m pip install pip --no-cache-dir \
22+
tensorflow-transform==0.21.2 \
23+
tensorflow_model_analysis==0.21.6 \
24+
ngraph-tensorflow-bridge \
25+
adanet==0.8.0
26+
27+
RUN python3 -m pip install pip --no-cache-dir \
28+
pandas==1.0.1 \
29+
tensorflow-gpu==${TENSORFLOW_VERSION} \
30+
tensorboard==2.1.1 \
31+
tensorflow-metadata==0.21.1 \
32+
tensorflow-datasets==3.1.0 \
33+
tensorflow_probability==0.9.0 \
34+
tensorflow-addons==0.8.3 \
35+
neural-structured-learning \
36+
tensorflow-model-optimization==0.2.1 \
37+
tensorflow-hub==0.7.0 \
38+
tensorflow_text==2.1.1 \
39+
tensorflow-graphics-gpu==1.0.0 \
40+
tensorflow-gan==2.0.0 \
41+
tensorflow_text==2.1.1 \
42+
tensorflow-data-validation==0.21.5 \
43+
fairness-indicators==0.1.2 \
44+
tensorboard-plugin-fairness-indicators==0.0.3 \
45+
fairness==0.1.8 \
46+
tfx==0.21.2 \
47+
tfx-bsl==0.21.4 \
48+
tf-agents==0.3.0 \
49+
tensorflow-lattice-gpu==0.9.8 \
50+
tensorflow-lattice==2.0.3 \
51+
tensorflow_ranking==0.2.3 \
52+
tensorflow-compression==1.3 \
53+
tensor2tensor==1.15.4 \
54+
mesh-tensorflow \
55+
tensorflow-io==0.12.0 \
56+
jupyter-tensorboard==0.2.0 \
57+
tensorwatch==0.8.10 \
58+
jupyterlab-nvdashboard==0.2.0
59+
60+
RUN python3 -m pip install --no-cache-dir \
61+
tensorwatch==0.8.10 \
62+
jupyterlab-nvdashboard==0.2.0
63+
64+
# Install Horovod, temporarily using CUDA stubs
65+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
66+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
67+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
68+
pip install --no-cache-dir horovod==0.19.0 && \
69+
ldconfig
70+
71+
RUN python3 -m pip install --no-cache-dir \
72+
mpi4py==3.0.3 \
73+
nni
74+
75+
# Install ipython kernelspec
76+
Run python3 -m ipykernel install --display-name "TensorFlow 2.2rc0 on Python 3.6 (CUDA 10.1)" && \
77+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
78+
79+
# Jupyter notebook extension
80+
RUN mkdir -p /home/work/.jupyter/nbextension
81+
WORKDIR /home/work/.jupyter/nbextension
82+
83+
RUN jupyter nbextensions_configurator enable && \
84+
jupyter contrib nbextension install && \
85+
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
86+
jupyter contrib nbextension install && \
87+
jupyter serverextension enable --py jupyterlab --sys-prefix && \
88+
jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
89+
# jupyter labextension install jupyterlab-nvdashboard && \
90+
git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
91+
jupyter nbextension enable /home/work/.jupyter/nbextension/vim_binding/vim_binding
92+
93+
# Backend.AI specifics
94+
LABEL ai.backend.kernelspec="1" \
95+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
96+
ai.backend.features="batch query uid-match user-input" \
97+
ai.backend.base-distro="ubuntu16.04" \
98+
ai.backend.resource.min.cpu="1" \
99+
ai.backend.resource.min.mem="1g" \
100+
ai.backend.resource.min.cuda.device=1 \
101+
ai.backend.resource.min.cuda.shares=0.1 \
102+
ai.backend.runtime-type="python" \
103+
ai.backend.runtime-path="/usr/bin/python3" \
104+
ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006,jupyter:http:8080,jupyterlab:http:8090"
105+
106+
WORKDIR /home/work
107+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)