Spaces:
Running
Running
| FROM python:3.10-slim-bookworm | |
| # System tools | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| ENV ENABLE_CLONE_ENGINES=1 | |
| ENV PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| # Docker profile runs the CPU voice-clone backend. | |
| COPY requirements*.txt ./ | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu "torch==2.5.1+cpu" && \ | |
| if [ -f requirements-docker.txt ]; then \ | |
| pip install --no-cache-dir -r requirements-docker.txt; \ | |
| else \ | |
| pip install --no-cache-dir -r requirements.txt; \ | |
| fi | |
| # Copy app | |
| COPY app.py . | |
| # Hugging Face Spaces runs on port 7860 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |