Skip to content

Commit 4eb2e4a

Browse files
committed
add simplesound at Pytorch kernels
1 parent 72e8bc3 commit 4eb2e4a

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
FROM lablup/common-base:20.03-py36-cuda10.1
2+
3+
# Install TensorFlow, Keras, PyTorch and MXNet
4+
ENV PYTORCH_VERSION=1.5.0
5+
ENV TORCHVISION_VERSION=0.6.0
6+
ENV TORCHAUDIO_VERSION=0.5.0
7+
ENV TORCHTEXT_VERSION=0.6.0
8+
ENV TENSORBOARDX_VERSION=1.9
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
11+
12+
ENV PYTHONUNBUFFERED=1 \
13+
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
14+
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" \
15+
LANG=C.UTF-8
16+
17+
# Set default shell to /bin/bash
18+
SHELL ["/bin/bash", "-cu"]
19+
20+
# Install TensorFlow, Keras, PyTorch and MXNet
21+
RUN python3 -m pip install pip --no-cache-dir -Iv \
22+
Cython==0.29.13 \
23+
numpy==1.16.5 \
24+
scipy==1.4.1 \
25+
scikit-image==0.16.2 \
26+
scikit-learn==0.21.3 \
27+
matplotlib==3.1.3 \
28+
tornado==6.0.4 \
29+
pystan==2.19.1.1 \
30+
notebook==6.0.3
31+
32+
RUN python3 -m pip install --no-cache-dir \
33+
https://download.pytorch.org/whl/cu101/torch-${PYTORCH_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
34+
https://download.pytorch.org/whl/cu101/torchvision-${TORCHVISION_VERSION}%2Bcu101-cp36-cp36m-linux_x86_64.whl \
35+
https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp36-cp36m-linux_x86_64.whl \
36+
torchtext==${TORCHTEXT_VERSION} && \
37+
python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
38+
39+
RUN apt update -y && \
40+
apt install -y openjdk-11-jdk && \
41+
python3 -m pip install --no-cache-dir \
42+
sentencepiece \
43+
psutil \
44+
future \
45+
torchserve \
46+
torch-model-archiver
47+
48+
RUN python3 -m pip install --no-cache-dir --extra-index-url \
49+
https://developer.download.nvidia.com/compute/redist/cuda/10.0 \
50+
nvidia-dali
51+
52+
RUN python3 -m pip install pip --no-cache-dir \
53+
jupyter-tensorboard==0.2.0 \
54+
tensorwatch==0.8.10 \
55+
jupyterlab-nvdashboard==0.2.0
56+
57+
# Install Horovod, temporarily using CUDA stubs
58+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
59+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
60+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
61+
pip install --no-cache-dir git+https://github.com/horovod/horovod && \
62+
# horovod==0.19.0 && \
63+
ldconfig
64+
65+
RUN python3 -m pip install --no-cache-dir \
66+
mpi4py==3.0.3 \
67+
nni
68+
69+
# Install ipython kernelspec
70+
Run python3 -m ipykernel install --display-name "PyTorch 1.5 on Python 3.6 (CUDA 10.1)" && \
71+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
72+
73+
# Jupyter notebook extension
74+
RUN mkdir -p /home/work/.jupyter/nbextension
75+
WORKDIR /home/work/.jupyter/nbextension
76+
77+
RUN jupyter nbextensions_configurator enable && \
78+
jupyter contrib nbextension install && \
79+
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
80+
jupyter contrib nbextension install && \
81+
jupyter serverextension enable --py jupyterlab --sys-prefix && \
82+
jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
83+
# jupyter labextension install jupyterlab-nvdashboard && \
84+
git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
85+
jupyter nbextension enable /home/work/.jupyter/nbextension/vim_binding/vim_binding
86+
87+
# Backend.AI specifics
88+
LABEL ai.backend.kernelspec="1" \
89+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
90+
ai.backend.features="batch query uid-match user-input" \
91+
ai.backend.base-distro="ubuntu16.04" \
92+
ai.backend.resource.min.cpu="1" \
93+
ai.backend.resource.min.mem="1g" \
94+
ai.backend.resource.min.cuda.device=0 \
95+
ai.backend.resource.min.cuda.shares=0 \
96+
ai.backend.runtime-type="python" \
97+
ai.backend.runtime-path="/usr/bin/python3" \
98+
ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006,jupyter:http:8080,jupyterlab:http:8090"
99+
100+
WORKDIR /home/work
101+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)