# YT HISTRY NEXUS v17 — HF Space Dockerfile FROM python:3.12-slim ENV PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PORT=7860 # system deps: ffmpeg (Debian build has drawtext/xfade/sidechaincompress) + fonts RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg \ fonts-dejavu-core \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt # faster-whisper (audio = source of truth) — best-effort, non-fatal RUN pip install "faster-whisper>=1.0.3" || true # piper local TTS fallback + voice model — guarantees speech even if edge/gTTS blocked RUN mkdir -p /app/assets/voices \ && curl -sL -o /app/assets/voices/en_US-lessac-medium.onnx \ "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx" || true \ && curl -sL -o /app/assets/voices/en_US-lessac-medium.onnx.json \ "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" || true COPY . . RUN chmod +x start.sh && mkdir -p vault state artifacts logs assets/music EXPOSE 7860 CMD ["./start.sh"]