FROM python:3.10 RUN apt-get update && apt-get install -y \ git \ git-lfs \ ffmpeg \ libsm6 \ libxext6 \ cmake \ rsync \ libgl1 \ libglx-mesa0 \ && rm -rf /var/lib/apt/lists/* \ && git lfs install WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Hugging Face cache => /tmp ENV HF_HOME=/tmp/huggingface_cache ENV HF_HUB_CACHE=/tmp/huggingface_cache RUN mkdir -p /tmp/huggingface_cache && chmod -R 777 /tmp/huggingface_cache # Pre-download model into /tmp (optional for faster startup in Spaces docker build) RUN python -c "from faster_whisper import WhisperModel; WhisperModel('Systran/faster-whisper-small', device='cpu', compute_type='int8')" COPY . . CMD ["python", "app.py"]