Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -7
Dockerfile
CHANGED
|
@@ -1,21 +1,21 @@
|
|
| 1 |
FROM node:20-slim
|
| 2 |
|
| 3 |
-
# Instalar dependências
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
wget \
|
| 6 |
unzip \
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copiar arquivos
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
# Instalar dependências npm
|
| 15 |
RUN npm init -y && \
|
| 16 |
npm install express cors @xenova/transformers
|
| 17 |
|
| 18 |
-
# Baixar e instalar Piper
|
| 19 |
RUN mkdir -p textToSpeech && \
|
| 20 |
wget -O piper.tar.gz https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz && \
|
| 21 |
tar -xzf piper.tar.gz && \
|
|
@@ -23,9 +23,10 @@ RUN mkdir -p textToSpeech && \
|
|
| 23 |
chmod +x textToSpeech/piper && \
|
| 24 |
rm -rf piper piper.tar.gz
|
| 25 |
|
| 26 |
-
# Baixar modelo
|
| 27 |
-
RUN
|
| 28 |
-
wget -O textToSpeech/pt_BR-faber-medium.onnx
|
|
|
|
| 29 |
|
| 30 |
EXPOSE 7860
|
| 31 |
|
|
|
|
| 1 |
FROM node:20-slim
|
| 2 |
|
| 3 |
+
# Instalar dependências necessárias para o Piper
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
wget \
|
| 6 |
unzip \
|
| 7 |
+
espeak-ng \
|
| 8 |
+
libespeak-ng1 \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
|
|
|
| 13 |
COPY . .
|
| 14 |
|
|
|
|
| 15 |
RUN npm init -y && \
|
| 16 |
npm install express cors @xenova/transformers
|
| 17 |
|
| 18 |
+
# Baixar e instalar Piper
|
| 19 |
RUN mkdir -p textToSpeech && \
|
| 20 |
wget -O piper.tar.gz https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz && \
|
| 21 |
tar -xzf piper.tar.gz && \
|
|
|
|
| 23 |
chmod +x textToSpeech/piper && \
|
| 24 |
rm -rf piper piper.tar.gz
|
| 25 |
|
| 26 |
+
# Baixar modelo português
|
| 27 |
+
RUN mkdir -p textToSpeech/pt_BR && \
|
| 28 |
+
wget -O textToSpeech/pt_BR/pt_BR-faber-medium.onnx https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx && \
|
| 29 |
+
wget -O textToSpeech/pt_BR/pt_BR-faber-medium.onnx.json https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx.json
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
|