@@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
7
7
LIBRARY_PATH=/usr/local/cuda/lib64/stubs \
8
8
_CUDA_COMPAT_PATH="/usr/local/cuda/compat" \
9
9
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/include/x86_64-linux-gnu" \
10
- PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/minicondaenv/espnet /bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tensorrt/bin" \
10
+ PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/opt/conda /bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tensorrt/bin" \
11
11
LANG=C.UTF-8
12
12
13
13
ENV CUDA_VERSION 11.0.3
@@ -70,8 +70,7 @@ RUN apt-get update && \
70
70
apt-get clean && \
71
71
rm -rf /var/lib/apt/lists/*
72
72
73
- # # FROM CUDA 11.0 base [https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/11.0/base/Dockerfile]
74
-
73
+ # # FROM CUDA 11.0 base
75
74
RUN apt-get update && \
76
75
apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \
77
76
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
@@ -90,8 +89,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
90
89
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
91
90
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
92
91
93
- # # FROM CUDA 11.0 runtime [https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/11.0/runtime/Dockerfile]
94
-
92
+ # # FROM CUDA 11.0 runtime
95
93
RUN apt-get update && apt-get install -y --no-install-recommends \
96
94
cuda-libraries-11-0=11.0.3-1 \
97
95
libnpp-11-0=11.1.0.245-1 \
@@ -103,8 +101,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
103
101
apt-mark hold libcublas-11-0 libnccl2 && \
104
102
rm -rf /var/lib/apt/lists/*
105
103
106
- # # FROM CUDA 11.0 devel [https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/11.0/devel/Dockerfile]
107
-
104
+ # # FROM CUDA 11.0 devel
108
105
RUN apt-get update && apt-get install -y --no-install-recommends \
109
106
cuda-cudart-dev-11-0=11.0.221-1 \
110
107
cuda-command-line-tools-11-0=11.0.3-1 \
@@ -120,14 +117,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
120
117
rm -rf /var/lib/apt/lists/*
121
118
122
119
# # FROM CUDA 11.0-CUDNN 8 devel
123
-
124
120
RUN apt-get update && apt-get install -y --no-install-recommends \
125
121
libcudnn8=$CUDNN_VERSION-1+cuda11.0 \
126
122
libcudnn8-dev=$CUDNN_VERSION-1+cuda11.0 && \
127
123
apt-mark hold libcudnn8 && \
128
124
rm -rf /var/lib/apt/lists/*
129
125
130
-
126
+ # Install Conda
131
127
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh -O miniconda.sh && \
132
128
mkdir -p /opt && \
133
129
sh miniconda.sh -b -p /opt/conda && \
@@ -139,11 +135,7 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux
139
135
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
140
136
/opt/conda/bin/conda clean -afy
141
137
142
- # Install Kaldi
143
- # RUN git clone https://github.com/kaldi-asr/kaldi
144
-
145
- WORKDIR /tmp
146
- # OpenBlas
138
+ # Install OpenBlas
147
139
RUN git clone -q --branch=master git://github.com/xianyi/OpenBLAS.git && \
148
140
cd OpenBLAS && \
149
141
make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \
@@ -173,12 +165,9 @@ RUN mkdir /tmp/openmpi && \
173
165
ldconfig && \
174
166
rm -rf /tmp/openmpi*
175
167
176
- # Install OpenSSH for MPI to communicate between containers
177
- RUN apt-get install -y --no-install-recommends openssh-client openssh-server && \
178
- mkdir -p /var/run/sshd
179
-
180
168
# Allow OpenSSH to talk to containers without asking for confirmation
181
- RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
169
+ RUN mkdir -p /var/run/sshd && \
170
+ cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
182
171
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
183
172
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
184
173
@@ -191,14 +180,6 @@ RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
191
180
# Configure OpenMPI to run good defaults:
192
181
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
193
182
194
- # Install OpenSSH for MPI to communicate between containers
195
- RUN mkdir -p /var/run/sshd
196
-
197
- # Allow OpenSSH to talk to containers without asking for confirmation
198
- RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
199
- echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
200
- mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
201
-
202
183
# Install git-lfs
203
184
WORKDIR /tmp
204
185
RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.13.1/git-lfs-linux-amd64-v2.13.1.tar.gz && \
@@ -212,6 +193,7 @@ RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.8.0/code-se
212
193
mv /usr/local/lib/code-server-3.8.0-linux-amd64 /usr/local/lib/code-server-3.8.0 && \
213
194
ln -s /usr/local/lib/code-server-3.8.0/bin/code-server /usr/local/bin/code-server
214
195
196
+ # Install Kaldi
215
197
RUN git clone https://github.com/hephaex/kaldi.git /opt/kaldi && \
216
198
cd /opt/kaldi/tools && \
217
199
./extras/install_mkl.sh -sp debian intel-mkl-64bit-2019.2-057 && \
@@ -232,22 +214,8 @@ RUN git clone https://github.com/hephaex/kaldi.git /opt/kaldi && \
232
214
find /opt/kaldi/src -name "*.o" -exec rm -f {} \;
233
215
234
216
235
- ENV CUDA_VER 11.0
236
- # WORKDIR /
237
-
238
- RUN git clone https://github.com/espnet/espnet /opt/espnet
239
- # IF using a local ESPNet repository, a temporary file containing the ESPnet git repo is copied over
240
- # ARG ESPNET_ARCHIVE=./espnet-local.tar
241
- # COPY ${ESPNET_ARCHIVE} /espnet-local.tar
242
-
243
-
244
217
# Download ESPnet
245
- # RUN echo "Getting ESPnet sources from local repository, in temporary file: " ${ESPNET_ARCHIVE}
246
- # RUN mkdir /espnet
247
- # RUN tar xf espnet-local.tar -C /espnet/
248
-
249
- # RUN cd espnet && \
250
- # rm -rf docker egs test utils
218
+ RUN git clone https://github.com/espnet/espnet /opt/espnet
251
219
252
220
# Install espnet
253
221
WORKDIR /opt/espnet/tools
@@ -276,7 +244,6 @@ RUN if [ -z "$( which nvcc )" ]; then \
276
244
make KALDI=/opt/kaldi ${MY_OPTS}
277
245
278
246
# Add extra libraries (VC/TTS)
279
-
280
247
WORKDIR /opt/espnet/tools
281
248
RUN /opt/conda/bin/python3 -m pip install --no-cache-dir \
282
249
torch==1.7.1 parallel_wavegan && \
@@ -294,15 +261,8 @@ RUN /opt/conda/bin/python3 -m pip install --no-cache-dir \
294
261
COPY ./service-defs /etc/backend.ai/service-defs
295
262
RUN echo ". /opt/espnet/tools/activate_python.sh" >> /etc/profile
296
263
297
- RUN \
298
- # mkdir -p /opt/espnet/egs/ljspeech/tts1/downloads && \
299
- # cd /opt/espnet/egs/ljspeech/tts1/downloads && \
300
- # wget http://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2 && \
301
- # tar -vxf ./*.tar.bz2 && \
302
- # rm ./*.tar.bz2 && \
303
- chmod +x /opt/espnet/tools/activate_python.sh && \
264
+ RUN chmod +x /opt/espnet/tools/activate_python.sh && \
304
265
chmod -R 777 /opt/espnet
305
- # chmod -R 777 /opt/espnet/egs/ljspeech/tts1/downloads
306
266
307
267
# Install ipython kernelspec
308
268
Run /opt/conda/bin/python3 -m ipykernel install --display-name "A4003 (ESPNet, PyTorch 1.7.1 on Python 3.7 & CUDA 11.0)" && \
0 commit comments