FROM vllm/vllm-omni:v0.28.0

RUN python -m pip install --no-cache-dir \
    voxcpm \
    soundfile \
    httpx \
    ninja

COPY config/voxcpm2-a10-container.yaml /opt/config/voxcpm2.yaml

RUN mkdir -p /opt/vllm-omni/examples/online_serving/text_to_speech/voxcpm2

COPY tools/precompute_custom_voice.py \
    /opt/vllm-omni/examples/online_serving/text_to_speech/voxcpm2/precompute_custom_voice.py

CMD ["vllm", "serve", "openbmb/VoxCPM2", "--omni", "--deploy-config", "/opt/config/voxcpm2.yaml", "--host", "0.0.0.0", "--port", "8000"]