jokowi-tts / Dockerfile
Atmint's picture
Upload 5 files
4c6dea7 verified
Raw
History Blame Contribute Delete
826 Bytes
FROM python:3.10-slim
# System dependencies needed by audio libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libsndfile1 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install PyTorch CPU first — separate layer so it's cached on rebuilds
RUN pip install --no-cache-dir \
torch==2.1.0 \
torchaudio==2.1.0 \
--index-url https://download.pytorch.org/whl/cpu
# Install remaining Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source code
COPY main.py rvc_pipeline.py ./
# Copy model files
# These are uploaded to the Space repo via the HF web UI
COPY ["Jokowi Voice Model", "./Jokowi Voice Model"]
# HF Spaces requires port 7860
ENV PORT=7860
EXPOSE 7860
CMD ["python", "main.py"]