name: llm-transformers-audio

services:
  audio-api:
    image: ${TRANSFORMERS_IMAGE:-vllm/vllm-openai:v0.10.2}
    container_name: ${TRANSFORMERS_CONTAINER_NAME:-llm-transformers-audio}
    restart: unless-stopped
    ipc: host
    ports:
      - "${TRANSFORMERS_HOST_PORT:-8020}:8020"
    environment:
      HF_HOME: /root/.cache/huggingface
      MODEL_PATH: ${MODEL_PATH:-/models/audio/whisper-large-v3-turbo}
      SERVED_MODEL_NAME: ${SERVED_MODEL_NAME:-whisper-large-v3-turbo}
      PORT: "8020"
      LOAD_ON_START: ${LOAD_ON_START:-0}
    volumes:
      - ${HOST_APP_DIR:-Z:/LLM/model-chat-app}:/app
      - ${HOST_MODELS_DIR:-Z:/LLM/models}:/models
      - ${HOST_HF_CACHE_DIR:-Z:/LLM/models/cache/huggingface}:/root/.cache/huggingface
    working_dir: /app
    entrypoint: python3
    command:
      - scripts/transformers_plugin_server.py
      - --plugin
      - audio
      - --host
      - 0.0.0.0
      - --port
      - "8020"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities:
                - gpu
