# cuframes-composer — пример docker-compose сервиса. # # Этот файл — образец для интеграции в localhost-infra/hosts/R9-88.23/docker/cctv/. # В проде используется как отдельный service `cfc-grid` рядом с существующим # cuda-grid-pipeline (постепенный переход в Phase 6). # # Зависимости (должны существовать в основном compose-стеке): # - cuframes-ipc-anchor (для IPC namespace) # - cuda-grid-mediamtx (RTSP server) # - cctv-mosquitto (MQTT broker) # - cctv-network (общая Docker network) # - cctv_cuframes_sock volume (с cuframes UNIX-сокетами публишеров) # - cuda_grid_icons volume (RGBA PNG-иконки) services: cfc-grid: image: gx/cuframes-composer:0.1 container_name: cfc-grid restart: unless-stopped runtime: nvidia # NVIDIA Container Toolkit environment: NVIDIA_DRIVER_CAPABILITIES: "compute,utility,video" NVIDIA_VISIBLE_DEVICES: "all" networks: - cctv ipc: "container:cuframes-ipc-anchor" depends_on: - cuframes-ipc-anchor - cuda-grid-mediamtx - cctv-mosquitto volumes: - cctv_cuframes_sock:/run/cuframes:ro - cuda_grid_icons:/icons:ro - /usr/share/fonts/truetype/dejavu:/fonts:ro - /tmp/cfc-pipe-dir:/out ports: - "5599:5599" # ZMQ control plane command: - "--out" - "/out/grid.h264" - "--fps=25" - "--bitrate=4000" - "--width=1920" - "--height=1080" - "--border=4" - "--control=tcp://0.0.0.0:5599" - "--mqtt=cctv-mosquitto:1883" - "--mqtt-instance=cfc-grid" - "--mqtt-user=composer" - "--mqtt-pass=${COMPOSER_MQTT_PASSWORD}" - "--text=id=label-parking:/fonts/DejaVuSans-Bold.ttf,28,255,255,255,16,16,Парковка" - "--text=id=label-backyard:/fonts/DejaVuSans-Bold.ttf,28,255,255,255,976,16,Задний двор" - "--text=id=label-frontyard:/fonts/DejaVuSans-Bold.ttf,28,255,255,255,16,556,Передний двор" - "--text=id=label-gate:/fonts/DejaVuSans-Bold.ttf,28,255,255,255,976,556,Ворота LPR" - "--cell=cam-parking,0,0,960,540" - "--cell=cam-back_yard,960,0,960,540" - "--cell=cam-front_yard,0,540,960,540" - "--cell=cam-gate_lpr,960,540,960,540" cfc-grid-ffmpeg: image: ffmpeg-vf-cuda-grid:phase4b-final container_name: cfc-grid-ffmpeg restart: unless-stopped networks: - cctv depends_on: - cfc-grid - cuda-grid-mediamtx volumes: - /tmp/cfc-pipe-dir:/pipe:ro entrypoint: ["/opt/ffmpeg/bin/ffmpeg"] command: - "-loglevel" - "warning" - "-fflags" - "+genpts" - "-r" - "25" - "-f" - "h264" - "-i" - "/pipe/grid.h264" - "-c" - "copy" - "-f" - "rtsp" - "-rtsp_transport" - "tcp" - "rtsp://cuda-grid-mediamtx:8554/cfc-grid" networks: cctv: external: true volumes: cctv_cuframes_sock: external: true cuda_grid_icons: external: true