Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # ffmpeg is the only system dependency; everything else is pure Python | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| fonts-noto-cjk \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # HF Spaces run containers as a non-root user by default; make sure the | |
| # working directories the app writes to (downloads/cache/outputs/logs/jobs) | |
| # are writable regardless of who ends up owning /app. | |
| RUN mkdir -p downloads cache outputs logs jobs && chmod -R 777 downloads cache outputs logs jobs | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |