services:
  fooocus-api:
    image: konieshadow/fooocus-api:latest
    container_name: fooocus-api
    ports:
      - "8888:8888"
    environment:
      # GPU config
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,utility
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    volumes:
      # 📂 Modèles
      - ./models/checkpoints:/app/repositories/Fooocus/models/checkpoints
      - ./models/vae:/app/repositories/Fooocus/models/vae_approx
      - ./models/upscale_models:/app/repositories/Fooocus/models/upscale_models
      - ./models/loras:/app/repositories/Fooocus/models/loras      
      # 📂 Résultats
      - ./outputs:/app/outputs
    restart: unless-stopped
