FROM python:3.11-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 WORKDIR /app # ffmpeg/ffprobe are required by the translation pipeline. RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt COPY . . ENV PORT=7860 EXPOSE 7860 # Hugging Face Spaces expects the app to listen on 0.0.0.0:$PORT. CMD ["sh", "-c", "gunicorn -w 1 -b 0.0.0.0:${PORT} app.main:app"]