plo / Dockerfile
Arabi32's picture
Update Dockerfile
a3536ba verified
Raw
History Blame Contribute Delete
1.61 kB
# ── Base image ────────────────────────────────────────────────────────
FROM python:3.10-slim
# ── System deps (audio libs required by TTS & Enhancer) ───────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libsndfile1 \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
# ── HuggingFace Spaces: non-root user uid=1000 ────────────────────────
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
COQUI_TOS_AGREED=1 \
HF_HOME=/data/huggingface \
TOKENIZERS_PARALLELISM=false
WORKDIR $HOME/app
# ── Python deps ───────────────────────────────────────────────────────
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# ── App code ─────────────────────────────────────────────────────────
COPY --chown=user app.py .
# ── Runtime dirs (writable by user 1000) ─────────────────────────────
RUN mkdir -p /home/user/app/voice_library /home/user/app/outputs
EXPOSE 7860
CMD ["python", "app.py"]