-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.arm32v7
34 lines (28 loc) · 1.79 KB
/
Dockerfile.arm32v7
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
FROM arm32v7/ubuntu:20.04
LABEL org.opencontainers.image.source https://github.com/Aculeasis/pocketsphinx-rest
ARG RUNTIME_PACKAGES="python3 locales libasound2 apulse"
ARG BUILD_PACKAGES="git build-essential swig libpulse-dev cmake libasound2-dev python3-dev wget python3-pip python3-setuptools ca-certificates"
RUN apt-get update -y && \
apt-get -y install --no-install-recommends $RUNTIME_PACKAGES && \
apt-mark manual $(apt-mark showauto) && \
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends $BUILD_PACKAGES && \
cd /usr/share/locale/ && ls | grep -v 'ru\|en\|locale.alias' | xargs rm -rf && \
locale-gen ru_RU.UTF-8 && \
pip3 install ninja~=1.10.2.4 flask~=2.3.3 pocketsphinx~=5.0.3 && \
wget -q https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Russian/zero_ru_cont_8k_v3.tar.gz/download -O /opt/zero_ru_cont_8k_v3.tar.gz && \
tar -xzf /opt/zero_ru_cont_8k_v3.tar.gz -C /opt/ && \
apt-get remove --purge -y $BUILD_PACKAGES $(apt-mark showauto) && \
apt-get autoremove -y && \
apt-get -y install --no-install-recommends $RUNTIME_PACKAGES && \
apt-get clean && \
rm /opt/zero_ru_cont_8k_v3/decoder-test.sh /opt/zero_ru_cont_8k_v3/decoder-test.wav /opt/zero_ru_cont_8k_v3.tar.gz && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp /usr/share/doc/* /usr/share/info/* /usr/lib/python*/test \
/usr/local/lib/python*/dist-packages/pocketsphinx/model /usr/local/lib/python*/dist-packages/pocketsphinx/data \
/opt/zero_ru_cont_8k_v3/zero_ru.cd_cont_4000 /opt/zero_ru_cont_8k_v3/zero_ru.cd_semi_4000 /root/.cache/*
ENV LC_ALL ru_RU.UTF-8
ENV LANG ru_RU.UTF-8
ENV LANGUAGE ru_RU.UTF-8
ADD entrypoint.sh /opt/entrypoint.sh
ADD app.py /opt/app.py
EXPOSE 8085/tcp
ENTRYPOINT ["/bin/bash", "/opt/entrypoint.sh"]