-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
75 lines (58 loc) · 1.91 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
67
68
69
70
71
72
73
74
75
ARG parent_image
FROM $parent_image
# Install pulse audio / development packages
RUN apt-get update && apt-get install g++ cmake libao4 libasound2-plugins \
libpulse-dev libpulse0 libsox-fmt-pulse paman paprefs \
pavucontrol pavumeter pulseaudio pulseaudio-module-bluetooth \
pulseaudio-module-gconf pulseaudio-module-jack pulseaudio-module-lirc \
pulseaudio-module-zeroconf pulseaudio-utils oss-compat git alsa-base alsa-utils -y
# Setting up ALSA
COPY asound.conf .
RUN cp -pf ./asound.conf /etc/asound.conf
# Install sphinxbase
RUN apt-get install autoconf libtool automake bison python-dev swig build-essential -y
RUN git clone https://github.com/cmusphinx/sphinxbase.git \
&& cd sphinxbase \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& cd ..
# Install pocketsphinx
RUN git clone https://github.com/cmusphinx/pocketsphinx.git \
&& cd pocketsphinx \
&& ./autogen.sh \
&& ./configure \
&& make clean all \
&& make check \
&& make install \
&& cd ..
ENV PYTHONPATH /usr/local/lib/python2.7/site-packages
# Install nodejs / npm
RUN apt-get install npm -y
RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
&& pkg-config --modversion pocketsphinx
RUN apt-get install wget -y
# Installing proper cmake version
RUN mkdir ~/temp \
&& cd ~/temp \
&& wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz \
&& tar -xzvf cmake-3.12.3.tar.gz \
&& cd cmake-3.12.3/ \
&& ./bootstrap \
&& make -j4 \
&& make install
# Install proper swig version
RUN cd ~/temp \
&& git clone https://github.com/swig/swig.git \
&& cd swig \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& apt remove swig2.0 -y
WORKDIR /var/www/localhost
RUN usermod -aG audio root
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - \
&& apt-get install -y nodejs
CMD ["npm", "run", "run"]