services:
  vllm:
    image: vllm/vllm-openai:v0.17.0
    container_name: ${CONTAINER_NAME}
    restart: always
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    networks:
      - opsmind-network
    volumes:
      - ./cache/huggingface:/root/.cache/huggingface
    environment:
      HUGGING_FACE_HUB_TOKEN: ${HUGGING_FACE_HUB_TOKEN}
      HF_ENDPOINT: https://hf-mirror.com
    ports:
      - ${PANEL_APP_PORT_HTTP}:8000
    ipc: host
    command: --model ${MODEL}
networks:
  opsmind-network:
    external: true
