Spaces:
Sleeping
Sleeping
File size: 693 Bytes
fe3947d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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"]
|