Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
#
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
| 5 |
libsndfile1 \
|
| 6 |
ffmpeg \
|
| 7 |
-
build-essential \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Create non-root user (HF Spaces requires uid 1000)
|
|
@@ -14,16 +14,14 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 14 |
|
| 15 |
WORKDIR /home/user/app
|
| 16 |
|
| 17 |
-
# Install Python
|
| 18 |
COPY --chown=user:user requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 20 |
pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
# Copy application
|
| 23 |
COPY --chown=user:user . .
|
| 24 |
|
| 25 |
-
# Expose port 7860 (HF Spaces default)
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
-
# Start the app
|
| 29 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# ✅ CRITICAL: Install espeak-ng — KittenTTS REQUIRES it for phonemization
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
espeak-ng \
|
| 6 |
libsndfile1 \
|
| 7 |
ffmpeg \
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Create non-root user (HF Spaces requires uid 1000)
|
|
|
|
| 14 |
|
| 15 |
WORKDIR /home/user/app
|
| 16 |
|
| 17 |
+
# Install Python deps
|
| 18 |
COPY --chown=user:user requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 20 |
pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
+
# Copy application
|
| 23 |
COPY --chown=user:user . .
|
| 24 |
|
|
|
|
| 25 |
EXPOSE 7860
|
| 26 |
|
|
|
|
| 27 |
CMD ["python", "app.py"]
|