Skip to content

Commit ce3ec1e

Browse files
committed
Python Tensorflow on CUDA 10.0
1 parent a9c3ac6 commit ce3ec1e

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM lablup/common-base:19.06-py36-cuda10
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV TENSORFLOW_VERSION=1.13.2
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
7+
8+
# Set default shell to /bin/bash
9+
SHELL ["/bin/bash", "-cu"]
10+
11+
# Install ipython kernelspec
12+
Run python3 -m ipykernel install --display-name "TensorFlow 1.13.2 on Python 3.6 (CUDA 10.0)" && \
13+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
14+
15+
RUN python3 -m pip install pip --no-cache-dir \
16+
pandas==1.0.1 \
17+
tensorflow-gpu==${TENSORFLOW_VERSION} \
18+
tensorboard==1.13 \
19+
ngraph-tensorflow-bridge \
20+
tensor2tensor==1.13.4 \
21+
jupyter-tensorboard==0.2.0 \
22+
tensorwatch==0.8.10
23+
24+
# Install Horovod, temporarily using CUDA stubs
25+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
26+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
27+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
28+
pip install --no-cache-dir horovod==0.19.0 && \
29+
ldconfig
30+
31+
RUN python3 -m pip install --no-cache-dir \
32+
mpi4py==3.0.3 \
33+
nni
34+
35+
# Backend.AI specifics
36+
LABEL ai.backend.kernelspec="1" \
37+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
38+
ai.backend.features="batch query uid-match user-input" \
39+
ai.backend.base-distro="ubuntu16.04" \
40+
ai.backend.resource.min.cpu="1" \
41+
ai.backend.resource.min.mem="1g" \
42+
ai.backend.resource.min.cuda.device=1 \
43+
ai.backend.resource.min.cuda.shares=0.1 \
44+
ai.backend.runtime-type="python" \
45+
ai.backend.runtime-path="/usr/bin/python3" \
46+
ai.backend.service-ports="jupyter:http:8080,jupyterlab:http:8090,ipython:pty:3000,tensorboard:http:6006"
47+
48+
WORKDIR /home/work
49+
# vim: ft=dockerfile
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM lablup/common-base:19.09-py36-cuda10
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV TENSORFLOW_VERSION=1.14.0
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
7+
8+
# Set default shell to /bin/bash
9+
SHELL ["/bin/bash", "-cu"]
10+
11+
# Install ipython kernelspec
12+
Run python3 -m ipykernel install --display-name "TensorFlow 1.14.0 on Python 3.6 (CUDA 10.0)" && \
13+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
14+
15+
RUN python3 -m pip install pip --no-cache-dir \
16+
pandas==1.0.1 \
17+
tensorflow-gpu==${TENSORFLOW_VERSION} \
18+
tensorboard==1.14 \
19+
ngraph-tensorflow-bridge \
20+
tensor2tensor==1.14.1 \
21+
jupyter-tensorboard==0.2.0 \
22+
tensorwatch==0.8.10
23+
24+
# Install Horovod, temporarily using CUDA stubs
25+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
26+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
27+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
28+
pip install --no-cache-dir horovod==0.19.0 && \
29+
ldconfig
30+
31+
RUN python3 -m pip install --no-cache-dir \
32+
mpi4py==3.0.3 \
33+
nni
34+
35+
# Backend.AI specifics
36+
LABEL ai.backend.kernelspec="1" \
37+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
38+
ai.backend.features="batch query uid-match user-input" \
39+
ai.backend.base-distro="ubuntu16.04" \
40+
ai.backend.resource.min.cpu="1" \
41+
ai.backend.resource.min.mem="1g" \
42+
ai.backend.resource.min.cuda.device=1 \
43+
ai.backend.resource.min.cuda.shares=0.1 \
44+
ai.backend.runtime-type="python" \
45+
ai.backend.runtime-path="/usr/bin/python3" \
46+
ai.backend.service-ports="jupyter:http:8080,jupyterlab:http:8090,ipython:pty:3000,tensorboard:http:6006"
47+
48+
WORKDIR /home/work
49+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)