Skip to content

Commit 5f80405

Browse files
committed
Tensorflow 2.7 python 3.8 & CUDA11.3
1 parent e0d361c commit 5f80405

File tree

1 file changed

+116
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)