-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
92 lines (76 loc) · 2.58 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
81
82
83
84
85
86
87
88
89
90
91
92
FROM debian:bookworm
ARG TARGETARCH
ARG TARGETVARIANT
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
# Needed for festvox packages
RUN echo 'deb http://deb.debian.org/debian bookworm contrib non-free' > /etc/apt/sources.list.d/contrib.list
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
python3 \
python3-venv \
wget \
espeak-ng \
espeak-ng-data \
flite \
festival \
festvox-ca-ona-hts \
festvox-czech-dita \
festvox-czech-krb \
festvox-czech-machac \
festvox-czech-ph \
festvox-don \
festvox-en1 \
festvox-kallpc16k \
festvox-kdlpc16k \
festvox-rablpc16k \
festvox-us1 \
festvox-us2 \
festvox-us3 \
festvox-us-slt-hts \
festvox-ellpc11k \
festvox-suopuhe-lj \
festvox-suopuhe-mv \
festvox-italp16k \
festvox-itapc16k \
festvox-mr-nsk \
festvox-ru \
festvox-te-nsk \
openjdk-17-jre-headless # marytts
WORKDIR /app
RUN mkdir -p ./local
# Install prebuilt nanoTTS
RUN mkdir -p ./local/nanotts && \
wget -O - --no-check-certificate \
"https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/nanotts-20200520_${TARGETARCH}${TARGETVARIANT}.tar.gz" | \
tar -C ./local/nanotts -xzf -
# Festival voices
RUN mkdir -p ./local/festival && \
wget -O - --no-check-certificate \
"https://github.com/synesthesiam/opentts/releases/download/v2.1/festival-voices.tar.gz" | \
tar -C ./local -xzf -
# Flite voices
RUN wget -O - --no-check-certificate \
"https://github.com/synesthesiam/opentts/releases/download/v2.1/flite-voices.tar.gz" | \
tar -C ./local -xzf -
# MaryTTS voices
RUN mkdir -p ./local/marytts && \
wget -O - --no-check-certificate \
"https://github.com/synesthesiam/opentts/releases/download/v2.1/marytts-voices.tar.gz" | \
tar -C ./local -xzf -
# Post-installation
RUN cp "./local/festival/ar/languages/language_arabic.scm" \
"/usr/share/festival/languages/" && \
mkdir -p "/usr/share/festival/voices/arabic" && \
cp -r "./local/festival/ar/voices/ara_norm_ziad_hts" "/usr/share/festival/voices/arabic/"
# Python module
COPY requirements.txt ./
RUN python3 -m venv .venv && \
.venv/bin/pip3 install --upgrade pip && \
.venv/bin/pip3 install --upgrade wheel setuptools
RUN .venv/bin/pip3 install -r requirements.txt
COPY wyoming_opentts/ ./wyoming_opentts/
COPY docker/run.sh ./
EXPOSE 10200
ENTRYPOINT ["bash", "/app/run.sh"]
# -----------------------------------------------------------------------------