|
1 |
| -FROM debian:8 |
| 1 | +FROM jcsilva/docker-kaldi-gstreamer-server |
2 | 2 | MAINTAINER Eduardo Silva < [email protected]>
|
3 | 3 |
|
4 |
| -RUN apt-get update && apt-get install -y \ |
5 |
| - autoconf \ |
6 |
| - automake \ |
7 |
| - bzip2 \ |
8 |
| - g++ \ |
9 |
| - git \ |
10 |
| - gstreamer1.0-plugins-good \ |
11 |
| - gstreamer1.0-tools \ |
12 |
| - gstreamer1.0-pulseaudio \ |
13 |
| - gstreamer1.0-plugins-bad \ |
14 |
| - gstreamer1.0-plugins-base \ |
15 |
| - gstreamer1.0-plugins-ugly \ |
16 |
| - libatlas3-base \ |
17 |
| - libgstreamer1.0-dev \ |
18 |
| - libtool-bin \ |
19 |
| - make \ |
20 |
| - python2.7 \ |
21 |
| - python-pip \ |
22 |
| - python-yaml \ |
23 |
| - python-simplejson \ |
24 |
| - python-gi \ |
25 |
| - subversion \ |
26 |
| - wget \ |
27 |
| - zlib1g-dev && \ |
28 |
| - apt-get clean autoclean && \ |
29 |
| - apt-get autoremove -y && \ |
30 |
| - pip install ws4py==0.3.2 && \ |
31 |
| - pip install tornado && \ |
32 |
| - ln -s /usr/bin/python2.7 /usr/bin/python ; ln -s -f bash /bin/sh |
33 |
| - |
34 |
| -RUN cd /opt && wget http://www.digip.org/jansson/releases/jansson-2.7.tar.bz2 && \ |
35 |
| - bunzip2 -c jansson-2.7.tar.bz2 | tar xf - && \ |
36 |
| - cd jansson-2.7 && \ |
37 |
| - ./configure && make && make check && make install && \ |
38 |
| - echo "/usr/local/lib" >> /etc/ld.so.conf.d/jansson.conf && ldconfig && \ |
39 |
| - rm /opt/jansson-2.7.tar.bz2 && rm -rf /opt/jansson-2.7 |
40 |
| - |
41 |
| -RUN cd /opt && \ |
42 |
| - git clone https://github.com/kaldi-asr/kaldi && \ |
43 |
| - cd /opt/kaldi/tools && \ |
44 |
| - make && \ |
45 |
| - ./install_portaudio.sh && \ |
46 |
| - cd /opt/kaldi/src && ./configure --shared && \ |
47 |
| - sed -i '/-g # -O0 -DKALDI_PARANOID/c\-O3 -DNDEBUG' kaldi.mk && \ |
48 |
| - make depend && make && \ |
49 |
| - cd /opt/kaldi/src/online && make depend && make && \ |
50 |
| - cd /opt/kaldi/src/gst-plugin && make depend && make && \ |
51 |
| - cd /opt && \ |
52 |
| - git clone https://github.com/alumae/gst-kaldi-nnet2-online.git && \ |
53 |
| - cd /opt/gst-kaldi-nnet2-online/src && \ |
54 |
| - sed -i '/KALDI_ROOT?=\/home\/tanel\/tools\/kaldi-trunk/c\KALDI_ROOT?=\/opt\/kaldi' Makefile && \ |
55 |
| - make depend && make && \ |
56 |
| - rm -rf /opt/gst-kaldi-nnet2-online/.git/ && \ |
57 |
| - find /opt/gst-kaldi-nnet2-online/src/ -type f -not -name '*.so' -delete && \ |
58 |
| - rm -rf /opt/kaldi/.git && \ |
59 |
| - rm -rf /opt/kaldi/egs/ /opt/kaldi/windows/ /opt/kaldi/misc/ && \ |
60 |
| - find /opt/kaldi/src/ -type f -not -name '*.so' -delete && \ |
61 |
| - find /opt/kaldi/tools/ -type f \( -not -name '*.so' -and -not -name '*.so*' \) -delete && \ |
62 |
| - cd /opt && git clone https://github.com/alumae/kaldi-gstreamer-server.git && \ |
63 |
| - rm -rf /opt/kaldi-gstreamer-server/.git/ && \ |
64 |
| - rm -rf /opt/kaldi-gstreamer-server/test/ |
65 |
| - |
66 |
| -COPY start.sh stop.sh /opt/ |
| 4 | +# This is the practical example part |
67 | 5 |
|
68 | 6 | RUN mkdir -p /opt/models && cd /opt/models && \
|
69 |
| - wget https://phon.ioc.ee/~tanela/tedlium_nnet_ms_sp_online.tgz && \ |
70 |
| - tar -zxvf tedlium_nnet_ms_sp_online.tgz && \ |
71 |
| - wget https://raw.githubusercontent.com/alumae/kaldi-gstreamer-server/master/sample_english_nnet2.yaml -P /opt/models && \ |
72 |
| - find /opt/models/ -type f | xargs sed -i 's:test:/opt:g' && \ |
73 |
| - sed -i 's:full-post-processor:#full-post-processor:g' /opt/models/sample_english_nnet2.yaml |
74 |
| - |
75 |
| - |
76 |
| - |
77 |
| -RUN chmod +x /opt/start.sh && \ |
78 |
| - chmod +x /opt/stop.sh |
79 |
| - |
80 |
| -CMD /opt/start.sh -y /opt/models/sample_english_nnet2.yaml |
| 7 | + wget https://phon.ioc.ee/~tanela/tedlium_nnet_ms_sp_online.tgz && \ |
| 8 | + tar -zxvf tedlium_nnet_ms_sp_online.tgz && \ |
| 9 | + wget https://raw.githubusercontent.com/alumae/kaldi-gstreamer-server/master/sample_english_nnet2.yaml -P /opt/models && \ |
| 10 | + find /opt/models/ -type f | xargs sed -i 's:test:/opt:g' && \ |
| 11 | + sed -i 's:full-post-processor:#full-post-processor:g' /opt/models/sample_english_nnet2.yaml |
| 12 | + |
| 13 | +RUN apt-get update && \ |
| 14 | + apt-get install -y supervisor && \ |
| 15 | + apt-get clean autoclean && \ |
| 16 | + apt-get autoremove -y && \ |
| 17 | + rm -rf /var/lib/apt/lists/* |
81 | 18 |
|
| 19 | +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf |
82 | 20 |
|
| 21 | +CMD ["/usr/bin/supervisord"] |
0 commit comments