This repository has been archived by the owner on Aug 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
/
Dockerfile
80 lines (63 loc) · 2.35 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
76
77
78
79
80
FROM ubuntu:eoan as build
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
ENV LANG C.UTF-8
ENV RHASSPY_APP /usr/share/rhasspy
ENV RHASSPY_VENV ${RHASSPY_APP}/.venv
WORKDIR /
RUN apt-get update && \
apt-get install --no-install-recommends --yes \
python3 python3-dev python3-setuptools python3-pip python3-venv \
build-essential swig portaudio19-dev libatlas-base-dev
COPY etc/shflags ${RHASSPY_APP}/etc/
COPY download/rhasspy-tools_*.tar.gz \
download/kaldi_*.tar.gz \
download/pocketsphinx-python.tar.gz \
download/snowboy-1.3.0.tar.gz \
download/precise-engine_0.3.0_*.tar.gz \
${RHASSPY_APP}/download/
COPY create-venv.sh download-dependencies.sh requirements.txt ${RHASSPY_APP}/
RUN cd ${RHASSPY_APP} && ./create-venv.sh --nosystem --noweb
# -----------------------------------------------------------------------------
FROM ubuntu:eoan
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
ENV LANG C.UTF-8
ENV RHASSPY_APP /usr/share/rhasspy
ENV RHASSPY_VENV ${RHASSPY_APP}/.venv
WORKDIR /
COPY --from=build ${RHASSPY_VENV} ${RHASSPY_VENV}
COPY --from=build ${RHASSPY_APP}/opt/kaldi/ ${RHASSPY_APP}/opt/kaldi/
RUN apt-get update && \
apt-get install --no-install-recommends --yes \
python3 python3-dev python3-setuptools python3-pip python3-venv \
bash jq unzip curl perl \
libportaudio2 libatlas3-base \
libgfortran4 ca-certificates \
sox espeak flite libttspico-utils alsa-utils lame \
libasound2-plugins \
libfreetype6-dev libpng-dev pkg-config libffi-dev libssl-dev \
gstreamer1.0-tools gstreamer1.0-plugins-good \
mosquitto-clients
# Web interface
ADD download/rhasspy-web-dist.tar.gz ${RHASSPY_APP}/
RUN ldconfig
# Copy script to run
COPY docker/run.sh /run.sh
RUN chmod +x /run.sh
COPY profiles/ ${RHASSPY_APP}/profiles/
COPY profiles/defaults.json ${RHASSPY_APP}/profiles/
COPY docker/rhasspy ${RHASSPY_APP}/bin/
COPY dist/ ${RHASSPY_APP}/dist/
COPY etc/wav/* ${RHASSPY_APP}/etc/wav/
COPY rhasspy/profile_schema.json ${RHASSPY_APP}/rhasspy/
COPY rhasspy/train/jsgf2fst/*.py ${RHASSPY_APP}/rhasspy/train/jsgf2fst/
COPY rhasspy/train/*.py ${RHASSPY_APP}/rhasspy/train/
COPY *.py ${RHASSPY_APP}/
COPY rhasspy/*.py ${RHASSPY_APP}/rhasspy/
COPY VERSION ${RHASSPY_APP}/
ENV CONFIG_PATH /data/options.json
ENV KALDI_PREFIX ${RHASSPY_APP}/opt
ENTRYPOINT ["/run.sh"]