Spaces:
Running
Running
| FROM python:3.11-slim | |
| # ffmpeg lets the ASR pipeline decode the browser's WebM/Opus audio. | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" \ | |
| HF_HOME=/home/user/.cache/huggingface | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| # CPU-only torch keeps the image small — Whisper Small runs fine on CPU. | |
| RUN pip install --no-cache-dir --user torch --index-url https://download.pytorch.org/whl/cpu \ | |
| && pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user . . | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["python3", "app.py"] | |