Skip to content

Commit 8ad6e85

Browse files
committed
Tensorflow 2.5 (Python 3.8 & CUDA 11.3)
1 parent a806392 commit 8ad6e85

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM lablup/common-base:py38-cuda11.3
2+
3+
RUN python3 -m pip install --no-cache-dir --upgrade \
4+
-q git+https://github.com/google-research/tensorflow_constrained_optimization
5+
6+
RUN python3 -m pip install --no-cache-dir \
7+
--use-feature=2020-resolver \
8+
requests_oauthlib==1.2.0 \
9+
neural-structured-learning==1.3.1 \
10+
pydot==1.4.0 \
11+
proto-plus==1.10.2
12+
RUN python3 -m pip install --no-cache-dir \
13+
--use-feature=2020-resolver \
14+
tensorflow-transform==0.25.0 \
15+
tensorflow_model_analysis \
16+
tensorflow-datasets \
17+
tensorflow_probability==0.11.1 \
18+
tensorflow-addons==0.11.2 \
19+
neural-structured-learning==1.3.1 \
20+
tensorflow-model-optimization==0.5.0 \
21+
tfx==0.25.0 \
22+
tfx-bsl==0.25.0 \
23+
tf-agents==0.6.0
24+
25+
RUN python3 -m pip install --no-cache-dir \
26+
--use-feature=2020-resolver \
27+
fastavro==1.2.0 \
28+
pymongo==3.11.2 \
29+
docker==4.4.1 \
30+
pbr==5.5.1 \
31+
mock==1.3.0 \
32+
proto-plus==1.13.0 \
33+
oauth2client==4.1.3 \
34+
future==0.18.1 \
35+
gin_config==0.4.0 \
36+
joblib==0.14.0 \
37+
libcst==0.3.14
38+
39+
RUN python3 -m pip install --no-cache-dir \
40+
--use-feature=2020-resolver \
41+
google_cloud_spanner==1.19.0 \
42+
googleapis-common-protos==1.51.0 \
43+
google_cloud_videointelligence==1.15.0 \
44+
google_cloud_vision==0.42.0 \
45+
google_cloud_pubsub==1.6.0 \
46+
google_cloud_dlp==0.15.0 \
47+
google_cloud_datastore==1.15.2 \
48+
google_cloud_bigtable==1.6.0 \
49+
google_api_core==1.24.0
50+
51+
RUN python3 -m pip install --no-cache-dir \
52+
mesh-tensorflow==0.1.18 \
53+
tensorflow-cloud==0.1.10 \
54+
tensorflow-hub==0.9.0
55+
56+
RUN python3 -m pip install --no-cache-dir \
57+
-i https://pypi-nightly.tensorflow.org/simple tensorflow-data-validation
58+
RUN python3 -m pip install --no-cache-dir \
59+
tensorflow-graphics-gpu==1.0.0 \
60+
tensorflow-io==0.17.0 \
61+
tensorflow_ranking==0.3.2 \
62+
tensorflow-plot==0.3.2 \
63+
tensorflow_text==2.4.1 \
64+
tensorflow-gan==2.0.0
65+
RUN python3 -m pip uninstall -y numpy scipy && \
66+
python3 -m pip install --no-cache-dir \
67+
tensorflow-gpu==2.5.0 \
68+
tensorboard-plugin-wit \
69+
tensorboard numpy scipy
70+
71+
RUN python3 -m pip install --extra-index-url \
72+
https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100 \
73+
&& \
74+
python3 -m pip install --extra-index-url \
75+
https://developer.download.nvidia.com/compute/redist nvidia-dali-tf-plugin-cuda100
76+
77+
# Install Horovod, temporarily using CUDA stubs
78+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
79+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL HOROVOD_NCCL_LINK=SHARED \
80+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1\
81+
HOROVOD_GPU=CUDA \
82+
python3 -m pip install --no-cache-dir horovod==0.21.1 && \
83+
ldconfig
84+
85+
RUN python3 -m pip install --no-cache-dir \
86+
mpi4py==3.0.3 \
87+
nni==1.9 \
88+
mlflow==1.12.1 \
89+
scikit-nni==0.2.1
90+
91+
COPY ./service-defs /etc/backend.ai/service-defs
92+
# Install ipython kernelspec
93+
Run python3 -m ipykernel install --display-name "TensorFlow 2.5 on Python 3.8 & CUDA 11.3" && \
94+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
95+
96+
# Copy Backend.Ai multi-node support
97+
COPY runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/
98+
99+
# Backend.AI specifics
100+
LABEL ai.backend.kernelspec="1" \
101+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
102+
ai.backend.features="batch query uid-match user-input" \
103+
ai.backend.base-distro="ubuntu16.04" \
104+
ai.backend.resource.min.cpu="1" \
105+
ai.backend.resource.min.mem="1g" \
106+
ai.backend.resource.min.cuda.device=0 \
107+
ai.backend.resource.min.cuda.shares=0 \
108+
ai.backend.runtime-type="python" \
109+
ai.backend.runtime-path="/usr/bin/python3" \
110+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8081,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080"
111+
112+
WORKDIR /home/work
113+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)