-
Notifications
You must be signed in to change notification settings - Fork 18
/
with_srilm.Dockerfile
29 lines (22 loc) · 1.17 KB
/
with_srilm.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
FROM proycon/kaldi_nl
#or:
#FROM proycon/kaldi
RUN apt-get update && \
apt-get install -y --no-install-recommends gawk
ENV SRILM=/opt/kaldi/tools/srilm
RUN mkdir /opt/kaldi/tools/srilm
# This requires you to provide the srilm.tar.gz yourself in the directory where you are building this container!
# SRI demands you fill a download form and add data, so this is not automated. Make sure to use version 1.7.3 or above
COPY srilm.tar.gz /opt/kaldi/tools/srilm/srilm.tar.gz
RUN cd /opt/kaldi/tools &&\
extras/install_liblbfgs.sh &&\
cd /opt/kaldi/tools/srilm && tar -xzf srilm.tar.gz &&\
mtype=$(sbin/machine-type) &&\
echo HAVE_LIBLBFGS=1 >> common/Makefile.machine.$mtype &&\
grep ADDITIONAL_INCLUDES common/Makefile.machine.$mtype | \
sed 's|$| -I$(SRILM)/../liblbfgs-1.10/include|' \
>> common/Makefile.machine.$mtype &&\
grep ADDITIONAL_LDFLAGS common/Makefile.machine.$mtype | \
sed 's|$| -L$(SRILM)/../liblbfgs-1.10/lib/ -Wl,-rpath -Wl,$(SRILM)/../liblbfgs-1.10/lib/|' \
>> common/Makefile.machine.$mtype &&\
make && cp bin/$mtype/* /usr/local/bin/ && echo "export SRILM=/opt/kaldi/tools/srilm" >> /opt/kaldi/tools/env.sh