FROM python:3.12-slim-bookworm ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 \ HF_HOME=/opt/models \ TRANSFORMERS_CACHE=/opt/models \ HUGGINGFACE_HUB_CACHE=/opt/models WORKDIR /code RUN apt-get update && apt-get install -y --no-install-recommends \ git \ wget \ curl \ libsndfile1 \ ffmpeg \ gcc \ g++ \ build-essential \ python3-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Pre-download model RUN python - <