forked from Aculeasis/rhvoice-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.amd64
More file actions
37 lines (31 loc) · 1.57 KB
/
Dockerfile.amd64
File metadata and controls
37 lines (31 loc) · 1.57 KB
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
# docker build -t aculeasis/rhvoice-rest:amd64 -f Dockerfile.amd64 .
FROM amd64/ubuntu:bionic
ARG RUNTIME_PACKAGES="lame python3 locales opus-tools flac"
ARG BUILD_PACKAGES="git scons python-lxml build-essential python3-pip python3-setuptools python3-wheel"
ARG PIP_PACKAGE="flask pymorphy2 rhvoice-wrapper rhvoice-wrapper-bin"
RUN apt-get update -y && \
apt-get -y install --no-install-recommends $RUNTIME_PACKAGES && \
apt-mark manual $(apt-mark showauto) && \
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 $PIP_PACKAGE && \
git clone https://github.com/vantu5z/RHVoice-dictionary.git /opt/RHVoice-dictionary && \
mkdir -p /usr/local/etc/RHVoice/dicts/Russian/ && \
cp /opt/RHVoice-dictionary/*.txt /usr/local/etc/RHVoice/dicts/Russian/ && \
cp -R /opt/RHVoice-dictionary/tools /opt/ && \
cd /opt && mkdir /opt/cfg && \
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 -rf /var/lib/apt/lists/* /tmp/* /var/tmp /usr/share/doc/* /usr/share/info/* \
/usr/lib/python*/test /root/.cache/* /opt/RHVoice-dictionary
ENV LC_ALL ru_RU.UTF-8
ENV LANG ru_RU.UTF-8
ENV LANGUAGE ru_RU.UTF-8
COPY entrypoint.sh /opt/entrypoint.sh
COPY rhvoice_rest_cache.py /opt/rhvoice_rest_cache.py
COPY app.py /opt/app.py
EXPOSE 8080/tcp
ENTRYPOINT ["/bin/bash", "/opt/entrypoint.sh"]