-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
66 lines (61 loc) · 2.27 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM nvcr.io/nvidia/kaldi:21.02-py3
MAINTAINER Derek Bartoli
RUN apt-get update && apt-get install -y \
procps \
autoconf \
automake \
bzip2 \
g++ \
git \
gstreamer1.0-plugins-good \
gstreamer1.0-tools \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-ugly \
libatlas3-base \
libgstreamer1.0-dev \
libtool-bin \
libasound-dev \
make \
python3-pip \
python3-yaml \
python3-simplejson \
python3-gi \
subversion \
unzip \
wget \
build-essential \
python-dev \
sox \
zlib1g-dev && \
apt-get clean autoclean && \
apt-get autoremove -y && \
pip3 install tornado
WORKDIR /opt
RUN wget http://www.digip.org/jansson/releases/jansson-2.7.tar.bz2 && \
bunzip2 -c jansson-2.7.tar.bz2 | tar xf - && \
cd jansson-2.7 && \
./configure && make -j $(nproc) && make check && make install && \
echo "/usr/local/lib" >> /etc/ld.so.conf.d/jansson.conf && ldconfig && \
rm /opt/jansson-2.7.tar.bz2 && rm -rf /opt/jansson-2.7
RUN cd /opt/kaldi/tools && rm -rf portaudio && ./install_portaudio.sh
RUN cd /opt/kaldi/src/gst-plugin && sed -i 's/-lmkl_p4n//g' Makefile && make depend -j $(nproc) && make -j $(nproc)
RUN cd /opt && \
git clone https://github.com/alumae/gst-kaldi-nnet2-online.git && \
cd /opt/gst-kaldi-nnet2-online/src && \
sed -i '/KALDI_ROOT?=\/home\/tanel\/tools\/kaldi-trunk/c\KALDI_ROOT?=\/opt\/kaldi' Makefile && head Makefile && \
make depend -j $(nproc) && make -j $(nproc) && \
rm -rf /opt/gst-kaldi-nnet2-online/.git/ && \
find /opt/gst-kaldi-nnet2-online/src/ -type f -not -name '*.so' -delete && \
rm -rf /opt/kaldi/.git && \
rm -rf /opt/kaldi/egs/ /opt/kaldi/windows/ /opt/kaldi/misc/ && \
find /opt/kaldi/src/ -type f -not -name '*.so' -delete && \
find /opt/kaldi/tools/ -type f \( -not -name '*.so' -and -not -name '*.so*' \) -delete && \
cd /opt && git clone https://github.com/alumae/kaldi-gstreamer-server.git -b py3 && \
rm -rf /opt/kaldi-gstreamer-server/.git/ && \
rm -rf /opt/kaldi-gstreamer-server/test/
COPY start.sh stop.sh /opt/
COPY worker.py /opt/kaldi-gstreamer-server/kaldigstserver/
RUN chmod +x /opt/start.sh && \
chmod +x /opt/stop.sh