name: detections-demo-jetson

services:
  loader:
    image: ${REGISTRY:-docker.azaion.com}/detections-loader-mock:${TAG:-latest}
    build:
      context: ./e2e/mocks/loader
    ports:
      - "8081:8080"
    volumes:
      - ./demo/models:/models
    networks:
      - demo-net

  annotations:
    image: ${REGISTRY:-docker.azaion.com}/detections-annotations-mock:${TAG:-latest}
    build:
      context: ./e2e/mocks/annotations
    ports:
      - "8082:8081"
    networks:
      - demo-net

  detections:
    image: ${REGISTRY:-docker.azaion.com}/detections-jetson:${TAG:-latest}
    build:
      context: .
      dockerfile: Dockerfile.jetson
    ports:
      - "8080:8080"
    runtime: nvidia
    environment:
      LOADER_URL: http://loader:8080
      ANNOTATIONS_URL: http://annotations:8081
      CLASSES_JSON_PATH: /app/classes.json
    volumes:
      - ./demo/models/classes.json:/app/classes.json:ro
      - detections-logs:/app/Logs
    shm_size: 512m
    depends_on:
      - loader
      - annotations
    networks:
      - demo-net

networks:
  demo-net:
    driver: bridge

volumes:
  detections-logs:
