Spaces:
Running
Running
| FROM python:3.10-slim | |
| WORKDIR /app | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git gcc libc6-dev ffmpeg && \ | |
| rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Pre-download model weights at build time so first inference is fast | |
| RUN bs-roformer-download \ | |
| --model roformer-model-bs-roformer-sw-by-jarredou \ | |
| --output-dir /app/models | |
| COPY . /app | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONIOENCODING=UTF-8 | |
| CMD ["python", "-u", "app.py"] | |