Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -1
Dockerfile
CHANGED
|
@@ -9,8 +9,23 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
ffmpeg \
|
| 10 |
libsndfile1 \
|
| 11 |
curl \
|
|
|
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Copy requirements (using client requirements)
|
| 15 |
COPY requirements_client.txt requirements.txt
|
| 16 |
|
|
@@ -34,4 +49,4 @@ ENV STREAMLIT_LOGGER_LEVEL=info
|
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
# Simple direct startup - backend on 8000, streamlit on 7860 (HF default)
|
| 37 |
-
CMD ["/bin/sh", "-c", "uvicorn backend:app --host 0.0.0.0 --port 8000 & streamlit run ui.py --server.port=7860 --server.address=0.0.0.0"]
|
|
|
|
| 9 |
ffmpeg \
|
| 10 |
libsndfile1 \
|
| 11 |
curl \
|
| 12 |
+
wget \
|
| 13 |
+
tar \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# Download and install Piper TTS (Linux version)
|
| 17 |
+
RUN wget -q https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz \
|
| 18 |
+
&& tar -xzf piper_amd64.tar.gz -C /app \
|
| 19 |
+
&& rm piper_amd64.tar.gz \
|
| 20 |
+
&& chmod +x /app/piper/piper
|
| 21 |
+
|
| 22 |
+
# Download Piper voice model (en_US-lessac-medium - natural voice, ~100MB)
|
| 23 |
+
RUN mkdir -p /app/piper/models \
|
| 24 |
+
&& wget -q -O /app/piper/models/en_US-lessac-medium.onnx \
|
| 25 |
+
https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx \
|
| 26 |
+
&& wget -q -O /app/piper/models/en_US-lessac-medium.onnx.json \
|
| 27 |
+
https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json
|
| 28 |
+
|
| 29 |
# Copy requirements (using client requirements)
|
| 30 |
COPY requirements_client.txt requirements.txt
|
| 31 |
|
|
|
|
| 49 |
EXPOSE 7860
|
| 50 |
|
| 51 |
# Simple direct startup - backend on 8000, streamlit on 7860 (HF default)
|
| 52 |
+
CMD ["/bin/sh", "-c", "uvicorn backend:app --host 0.0.0.0 --port 8000 & sleep 10 && streamlit run ui.py --server.port=7860 --server.address=0.0.0.0"]
|