Skip to content

Commit f4ff514

Browse files
committed
2 parents 2dd9d6c + 35cbbb5 commit f4ff514

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

python-kaldi/Dockerfile.py38-cuda11.1

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,24 @@ FROM lablup/common-base:py38-cuda11.1
22

33
# install kaldi
44
WORKDIR /opt
5-
RUN apt update ; apt-get install -y sox subversion
5+
RUN apt update && \
6+
apt list --upgradable && \
7+
apt-get install -y --no-install-recommends \
8+
sox subversion \
9+
patch wget rsync jq gnupg libtcmalloc-minimal4 \
10+
libglib2.0-0 less libnl-route-3-200 libnl-3-dev \
11+
libnl-route-3-dev libnuma-dev libnuma1 libpmi2-0-dev \
12+
autoconf bc flac gawk \
13+
libatlas3-base libtool \
14+
libatlas-base-dev \
15+
libasound-dev \
16+
gstreamer1.0-pulseaudio \
17+
gstreamer1.0-plugins-base \
18+
gstreamer1.0-plugins-good \
19+
gstreamer1.0-plugins-bad \
20+
gstreamer1.0-plugins-ugly \
21+
gstreamer1.0-tools \
22+
zlib1g-dev
623
RUN git clone https://github.com/hephaex/kaldi.git /opt/kaldi && \
724
cd /opt/kaldi/tools && \
825
make -j $(nproc) && \
@@ -20,8 +37,60 @@ RUN cd /opt/kaldi/src && \
2037
exec rm {} \; && \
2138
rm -rf /opt/kaldi/.git
2239

40+
COPY srilm.tar.gz /opt/kaldi/tools/.
41+
RUN cd /opt/kaldi/tools && \
42+
bash install_pfile_utils.sh && \
43+
bash install_portaudio.sh && \
44+
bash install_speex.sh && \
45+
bash install_srilm.sh
2346
RUN mkdir -p /workspace && \
2447
chmod -R 777 /workspace
48+
49+
# Install PyTorch and MXNet
50+
ENV PYTORCH_VERSION=1.7.1
51+
ENV TORCHVISION_VERSION=0.8.2
52+
ENV TORCHAUDIO_VERSION=0.7.2
53+
ENV TORCHTEXT_VERSION=0.8.1
54+
ENV TENSORBOARDX_VERSION=2.1
55+
ENV MXNET_VERSION=1.6.0
56+
57+
RUN python3 -m pip uninstall -y torch && \
58+
python3 -m pip install --no-cache-dir \
59+
https://download.pytorch.org/whl/cu110/torch-${PYTORCH_VERSION}%2Bcu110-cp38-cp38-linux_x86_64.whl \
60+
https://download.pytorch.org/whl/cu110/torchvision-${TORCHVISION_VERSION}%2Bcu110-cp38-cp38-linux_x86_64.whl \
61+
https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp38-cp38-linux_x86_64.whl \
62+
https://download.pytorch.org/whl/torchtext-${TORCHTEXT_VERSION}-cp38-cp38-linux_x86_64.whl && \
63+
python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
64+
65+
# torch2trt PyTorch to TensorRT converter which utilizes the TensorRT Python API
66+
WORKDIR /tmp
67+
RUN git clone https://github.com/NVIDIA-AI-IOT/torch2trt /tmp/torch2trt && \
68+
cd /tmp/torch2trt && \
69+
python3 setup.py install --plugins && \
70+
rm -fr /tmp/torch2trt
71+
72+
RUN python3 -m pip install --extra-index-url \
73+
https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100
74+
75+
# Install Horovod, temporarily using CUDA stubs
76+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
77+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
78+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
79+
pip install --no-cache-dir horovod==0.21.1 && \
80+
ldconfig
81+
82+
RUN python3 -m pip install --no-cache-dir \
83+
mpi4py==3.0.3 \
84+
mlflow==1.12.1 \
85+
tensorboard-plugin-wit>=1.6.0 \
86+
nni==1.9 \
87+
scikit-nni==0.2.1
88+
89+
RUN apt autoclean && \
90+
rm -rf /var/lib/apt/lists/* && \
91+
rm -rf /root/.cache && \
92+
rm -rf /tmp/*
93+
2594
# Install ipython kernelspec
2695
Run python3 -m ipykernel install --display-name "Lablup Kaldi 21.01 on Python 3\
2796
.8 (CUDA 11.1)" && \

0 commit comments

Comments
 (0)