| FROM python:3.10-slim |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| espeak-ng \ |
| libsndfile1 \ |
| wget \ |
| ca-certificates \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN wget -qO- https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin --strip-components=1 |
|
|
| |
| RUN pip install --no-cache-dir flask flask_cors |
|
|
| |
| |
| RUN wget -L -O en_US-lessac-medium.onnx "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx" && \ |
| wget -L -O en_US-lessac-medium.onnx.json "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" |
|
|
| COPY app.py . |
|
|
| ENV PORT=7860 |
| EXPOSE 7860 |
|
|
| CMD ["python", "app.py"] |