# ============================================================
# HalaVoice — SILMA TTS RunPod Serverless Worker
# Build:  docker build -t <dockerhub-user>/halavoice-silma-worker:1.0 .
# Push:   docker push <dockerhub-user>/halavoice-silma-worker:1.0
# ============================================================
FROM runpod/base:0.6.2-cuda12.1.0

# Python deps: RunPod SDK + SILMA TTS (pulls torch with CUDA)
RUN python3.11 -m pip install --no-cache-dir \
    runpod \
    silma-tts

# Pre-download the model into the image so cold starts don't
# fetch ~600MB from Hugging Face on every scale-up.
RUN python3.11 -c "from silma_tts.api import SilmaTTS; SilmaTTS()" || true

COPY handler.py /handler.py

CMD ["python3.11", "-u", "/handler.py"]
