-
Notifications
You must be signed in to change notification settings - Fork 17
/
kaldi.Dockerfile
52 lines (49 loc) · 1.83 KB
/
kaldi.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#note: this is the non-GPU function, suitable for production use but less suitable for training!
FROM debian:11.8-slim
LABEL org.opencontainers.image.title="kaldi" \
org.opencontainers.image.authors="Maarten van Gompel <[email protected]>" \
org.opencontainers.image.description="Kaldi ASR system" \
org.opencontainers.image.source="https://github.com/opensource-spraakherkenning-nl/Kaldi_NL/kaldi.Dockerfile"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash \
g++ \
make \
automake \
autoconf \
bzip2 \
unzip \
wget \
sox \
libsox-fmt-mp3 \
libtool \
git \
subversion \
python2.7-minimal \
python3-minimal \
zlib1g-dev \
ca-certificates \
gfortran \
patch
RUN ln -s /usr/bin/python3 /usr/bin/python
ENV KALDI_ROOT=/opt/kaldi
WORKDIR /opt/kaldi/
RUN git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi
RUN cd /opt/kaldi/tools && \
./extras/install_mkl.sh && \
make -j $(nproc) && \
cd /opt/kaldi/src && \
./configure --shared && \
make depend -j $(nproc) && \
make -j $(nproc) && \
find /opt/kaldi -type f \( -name "*.o" -o -name "*.la" -o -name "*.a" \) -exec rm {} \; && \
find /opt/intel -type f -name "*.a" -exec rm {} \; && \
find /opt/intel -type f -regex '.*\(_mc.?\|_mic\|_thread\|_ilp64\)\.so' -exec rm {} \; && \
rm -rf /opt/kaldi/.git /opt/kaldi/tools/*gz /opt/kaldi/tools/openfst-*/src /opt/kaldi/tools/sctk*/src /opt/kaldi/windows /opt/kaldi/misc && \
apt-get remove -y autoconf automake &&\
apt-get clean -y && \
apt-get autoremove -y && \
apt-get autoclean -y && \
rm -rf /tmp/* && \
rm -rf /var/lib/apt/lists/*
CMD /bin/bash -l