@@ -2,7 +2,24 @@ FROM lablup/common-base:py38-cuda11.1
2
2
3
3
# install kaldi
4
4
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
6
23
RUN git clone https://github.com/hephaex/kaldi.git /opt/kaldi && \
7
24
cd /opt/kaldi/tools && \
8
25
make -j $(nproc) && \
@@ -20,8 +37,60 @@ RUN cd /opt/kaldi/src && \
20
37
exec rm {} \; && \
21
38
rm -rf /opt/kaldi/.git
22
39
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
23
46
RUN mkdir -p /workspace && \
24
47
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
+
25
94
# Install ipython kernelspec
26
95
Run python3 -m ipykernel install --display-name "Lablup Kaldi 21.01 on Python 3\
27
96
.8 (CUDA 11.1)" && \
0 commit comments