services:
  # NVIDIA GPU -solmu
  native-node-nvidia:
    build:
      context: .
      dockerfile: Dockerfile.native-node
    container_name: kipina-node-nvidia
    environment:
      - HUB_URL=wss://kipina.studio/ws
      - ALLOCATED_GB=4
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    profiles:
      - nvidia

  # AMD GPU -solmu (ROCm)
  native-node-amd:
    build:
      context: .
      dockerfile: Dockerfile.native-node
    container_name: kipina-node-amd
    environment:
      - HUB_URL=wss://kipina.studio/ws
      - ALLOCATED_GB=4
    restart: unless-stopped
    devices:
      - /dev/kfd:/dev/kfd
      - /dev/dri:/dev/dri
    group_add:
      - video
      - render
    profiles:
      - amd

  # CPU-solmu (ei GPU:ta)
  native-node-cpu:
    build:
      context: .
      dockerfile: Dockerfile.native-node
    container_name: kipina-node-cpu
    environment:
      - HUB_URL=wss://kipina.studio/ws
      - ALLOCATED_GB=2
    restart: unless-stopped
    profiles:
      - cpu
