jcsilva / docker-kaldi-gstreamer-server

Dockerfile for kaldi-gstreamer-server.
BSD 2-Clause "Simplified" License
287 stars 140 forks source link

Docker image won't build with current version of Kaldi #51

Open dialogics opened 5 years ago

dialogics commented 5 years ago

The docker built fails when Kaldi executes "check_dependencies.sh" because the Docker image lacks "unzip". The Dockerfile needs to be modified to this:

` FROM debian:8 MAINTAINER Eduardo Silva zedudu@gmail.com

RUN apt-get update && apt-get install -y \ 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 \ make \ python2.7 \ python3 \ python-pip \ python-yaml \ python-simplejson \ python-gi \ subversion \ unzip \ wget \ build-essential \ python-dev \ sox \ zlib1g-dev && \ apt-get clean autoclean && \ apt-get autoremove -y && \ pip install ws4py==0.3.2 && \ pip install tornado && \ ln -s /usr/bin/python2.7 /usr/bin/python ; ln -s -f bash /bin/sh

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 && 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 git clone https://github.com/kaldi-asr/kaldi && \ cd /opt/kaldi/tools && \ make && \ ./install_portaudio.sh && \ cd /opt/kaldi/src && ./configure --shared && \ sed -i '/-g # -O0 -DKALDI_PARANOID/c-O3 -DNDEBUG' kaldi.mk && \ make depend && make && \ cd /opt/kaldi/src/online && make depend && make && \ cd /opt/kaldi/src/gst-plugin && make depend && make && \ 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 && \ make depend && make && \ 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 && \ rm -rf /opt/kaldi-gstreamer-server/.git/ && \ rm -rf /opt/kaldi-gstreamer-server/test/

COPY start.sh stop.sh /opt/

RUN chmod +x /opt/start.sh && \ chmod +x /opt/stop.sh `

bk203 commented 5 years ago

Created a pull request #52 for this issue with build container for testing docker pull bk203/docker-kaldi-gstreamer-server

wangjc888 commented 5 years ago

encounter an error with this Dockerfile: /bin/sh: wget: command not found

wangjc888 commented 5 years ago

encounter an error with this Dockerfile: /bin/sh: wget: command not found

solve the issue by update apt source list in China