# Reference docker-compose для Frigate + cuframes integration. # Полный guide: docs/integrations/frigate.md # # Что нужно подготовить заранее: # 1. Build local image local/frigate-cuframes:latest по Dockerfile.frigate # (см. docs/integrations/frigate.md, Шаг 1) # 2. Pull cuframes runtime image: # docker pull git.goldix.org/gx/cuframes:0.1 # либо собрать local # 3. Скопировать config/config.yml (placeholder в config/ рядом) # 4. .env с CAM_PARKING_PASS=... и FRIGATE_RTSP_PASSWORD=... # # Запуск: # docker compose up -d # # UI: http://host:5000 (internal, без auth) либо https://host:8971 (with auth) services: # 1× publisher на камеру — single source of RTSP + NVDEC cuframes-pub-parking: image: git.goldix.org/gx/cuframes:0.1 container_name: cuframes-pub-parking restart: unless-stopped runtime: nvidia ipc: shareable shm_size: 256m environment: NVIDIA_VISIBLE_DEVICES: all NVIDIA_DRIVER_CAPABILITIES: compute,video,utility volumes: - cuframes_sock:/run/cuframes command: - /usr/local/bin/cuframes-rtsp-source - --rtsp # Используем sub-stream для detect-path (lighter resolution, тот же camera load) - "rtsp://admin:${CAM_PARKING_PASS}@parking-cam-ip:554/cam/realmonitor?channel=1&subtype=1" - --key - cam-parking - --ring - "6" - --verbose frigate: image: local/frigate-cuframes:latest # см. docs/integrations/frigate.md Шаг 1 container_name: frigate restart: unless-stopped depends_on: cuframes-pub-parking: condition: service_started runtime: nvidia privileged: true shm_size: 512m # WARN: только ipc share — pid НЕ shared (Frigate's s6-overlay требует PID 1). # Frigate подсоединяется к first CUDA context publisher'а в shared /dev/shm. ipc: "container:cuframes-pub-parking" environment: FRIGATE_RTSP_PASSWORD: "${FRIGATE_RTSP_PASSWORD}" NVIDIA_VISIBLE_DEVICES: all NVIDIA_DRIVER_CAPABILITIES: compute,video,utility ports: - "5000:5000" # UI без auth (internal, не expose external!) - "8971:8971" # UI с HTTPS + auth - "8554:8554" # RTSP restream (go2rtc) - "8555:8555/tcp" - "8555:8555/udp" volumes: - cuframes_sock:/run/cuframes:ro - ./config/config.yml:/config/config.yml:ro - ./media:/media/frigate - type: tmpfs target: /tmp/cache tmpfs: { size: 1000000000 } volumes: cuframes_sock: