Skip to content

Commit 9dc0abd

Browse files
committed
clean up Dockerfile for python-espnet
1 parent 15e6d78 commit 9dc0abd

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

python-espnet/Dockerfile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
1010
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" \
1111
LANG=C.UTF-8
1212

13+
ENV CUDA_VER 11.0
1314
ENV CUDA_VERSION 11.0.3
1415
ENV CUDA_PKG_VERSION 11-0=$CUDA_VERSION-1
1516
ENV NCCL_VERSION 2.8.4
1617
ENV CUDNN_VERSION 8.0.5.39
18+
ENV TH_VERSION 1.7.1
1719
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
1820

1921
# nvidia-container-runtime
@@ -69,8 +71,6 @@ RUN apt-get update && \
6971
&& \
7072
apt-get clean && \
7173
rm -rf /var/lib/apt/lists/*
72-
73-
## FROM CUDA 11.0 base [https://gitlab.com/nvidia/cuda/blob/ubuntu18.04/11.0/base/Dockerfile]
7474
RUN apt-get update && \
7575
apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \
7676
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
@@ -113,7 +113,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
113113
apt-mark hold libcudnn8 && \
114114
rm -rf /var/lib/apt/lists/*
115115

116-
# Install Conda 3.7
116+
# Install miniconda 3.7
117117
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh -O miniconda.sh && \
118118
mkdir -p /opt && \
119119
sh miniconda.sh -b -p /opt/conda && \
@@ -205,8 +205,6 @@ RUN git clone https://github.com/hephaex/kaldi.git /opt/kaldi && \
205205
find /opt/kaldi/src -name "*.o" -exec rm -f {} \;
206206

207207
# Install espnet
208-
ENV TH_VERSION 1.7.1
209-
ENV CUDA_VER 11.0
210208
RUN git clone https://github.com/espnet/espnet /opt/espnet
211209
WORKDIR /opt/espnet/tools
212210

@@ -223,10 +221,6 @@ RUN if [ -z "$( which nvcc )" ]; then \
223221
MY_OPTS="CUDA_VERSION=${CUDA_VER}" && \
224222
. ./setup_cuda_env.sh /usr/local/cuda; \
225223
fi; \
226-
if [ "${CUDA_VER}" = "11.0" ]; then \
227-
# warpctc is not supported from Pytorch 1.3.1
228-
MY_OPTS="${MY_OPTS} TH_VERSION=1.7.1"; \
229-
fi; \
230224
echo "Make with options ${MY_OPTS}" && \
231225
ln -s /opt/kaldi ./ && \
232226
./setup_python.sh /opt/conda/bin/python3 && \
@@ -258,7 +252,6 @@ RUN echo "source /opt/espnet/tools/activate_python.sh" >> /etc/profile && \
258252
Run /opt/conda/bin/python3 -m ipykernel install --display-name "A4003 (ESPNet, PyTorch 1.7.1 on Python 3.7 & CUDA 11.0)" && \
259253
cat /usr/local/share/jupyter/kernels/python3/kernel.json
260254

261-
262255
# Backend.AI specifics
263256
LABEL ai.backend.kernelspec="1" \
264257
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \

0 commit comments

Comments
 (0)