Files
cuframes/examples/frigate-compose/docker-compose.yml
T
gx 12708618d4 docs: reference integrations + examples
- docs/integrations/frigate.md — полный production-tested guide:
  Dockerfile, docker-compose, config.yml, troubleshooting (s6+pid, scale_cuda,
  hwaccel issues), build steps
- docs/integrations/cctv-cpp.md — C++ pattern: IFrameSource interface +
  CuframesSource skeleton + CMake setup + runtime requirements
- examples/frigate-compose/ — reference compose stack (cuframes-pub + Frigate)
  с config.yml stub, .env.example, README
- examples/python-consumer/ — ctypes-based skeleton для AI/ML pipeline'ов
  (до v0.3 native pybind11 bindings)
- docs/integration.md — превратился в index-страницу, ссылается на specific guides

Reorganization упрощает onboarding: пользователь выбирает guide по типу
integration'а (Frigate/C++/Python/FFmpeg) и сразу видит реальный code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 21:37:35 +01:00

74 lines
2.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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: