name: rocinante

services:

  whisper:
    image: fedirz/faster-whisper-server:latest-cuda
    container_name: rocinante-whisper
    restart: unless-stopped
    ports:
      - "8787:8000"
    environment:
      WHISPER__MODEL: large-v3
      WHISPER__INFERENCE_DEVICE: cuda
      WHISPER__VAD_FILTER: "false"
      WHISPER__CONDITION_ON_PREVIOUS_TEXT: "false"
      TZ: ${TZ}
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    volumes:
      - whisper-cache:/root/.cache/huggingface

  watcher:
    build: ./watcher
    container_name: rocinante-watcher
    restart: unless-stopped
    environment:
      WHISPER_URL: http://whisper:8000
      N8N_WEBHOOK_URL: ${N8N_WEBHOOK_URL}
      WATCH_DIR: /recordings
      TZ: ${TZ}
    volumes:
      - C:/Recordings:/recordings
    depends_on:
      - whisper

volumes:
  whisper-cache:
