Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
#
|
| 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 |
-
#
|
| 11 |
RUN useradd -m -u 1000 user
|
| 12 |
USER user
|
| 13 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
| 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
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# CRITICAL: espeak-ng required for KittenTTS phonemization
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
espeak-ng \
|
| 6 |
libsndfile1 \
|
| 7 |
ffmpeg \
|
| 8 |
+
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# HF Spaces requires uid 1000
|
| 12 |
RUN useradd -m -u 1000 user
|
| 13 |
USER user
|
| 14 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 15 |
+
ENV HF_HOME="/home/user/.cache/huggingface"
|
| 16 |
|
| 17 |
WORKDIR /home/user/app
|
| 18 |
|
|
|
|
| 19 |
COPY --chown=user:user requirements.txt .
|
| 20 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 21 |
pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
|
|
|
| 23 |
COPY --chown=user:user . .
|
| 24 |
|
| 25 |
EXPOSE 7860
|