
services:

  server:
    container_name: lrs
    build:
      context: .
      dockerfile: ./docker/server.Dockerfile
    ports:
      - "8080:8080"
      # - "8731:8731"
    volumes:
      - "$HOME/.Lires:/root/.Lires"
    networks:
      - lires_net
  
  ai-server:
    container_name: lrs_ai
    build:
      context: .
      dockerfile: ./docker/iserver.Dockerfile
    volumes:
      - "$HOME/.Lires:/root/.Lires"
    environment:
      - OPENAI_API_KEY=sk-1234567890abcdef1234567890abcdef
      - OPENAI_API_BASE=https://api.openai.com/v1
    deploy:
      resources:
        reservations:
          devices:
            - driver: "nvidia"
              count: "all"
              capabilities: [gpu]
    networks:
      - lires_net

networks:
  lires_net:
    driver: bridge