version: '3.8'

services:
  whisperlive:
    container_name: whisperlive
    build:
      context: .
      dockerfile: Dockerfile
      args:
        PORT_WHISPERLIVE: ${PORT_WHISPERLIVE}
        FASTERWHISPER_MODEL: ${FASTERWHISPER_MODEL}
    env_file:
      - .env
    environment:
      LOG_PATH: /app/logs
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,utility
    volumes:
      - ./models:/app/models
      - ./ssl:/app/ssl
      - ./logs:/app/logs
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    ports:
      - ${PORT_WHISPERLIVE}:${PORT_WHISPERLIVE}
    networks:
      - audio-network

networks:
  audio-network:
    driver: bridge
