12708618d4
- 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>
62 lines
2.5 KiB
Markdown
62 lines
2.5 KiB
Markdown
# examples/frigate-compose
|
||
|
||
Reference docker-compose для Frigate + cuframes integration. **НЕ** копировать
|
||
в production бездумно — это шаблон, адаптируй под свою инфру (IP-адреса камер,
|
||
пароли, mount paths, network).
|
||
|
||
## Quickstart
|
||
|
||
1. Build patched Frigate image (single-time setup, ~15 мин):
|
||
```bash
|
||
# См. docs/integrations/frigate.md, Шаг 1 — там полный Dockerfile.
|
||
docker build -t local/frigate-cuframes:latest -f Dockerfile.frigate .
|
||
```
|
||
|
||
2. Pull cuframes publisher image:
|
||
```bash
|
||
docker pull git.goldix.org/gx/cuframes:0.1
|
||
# либо собрать local: docker build -t local/cuframes:0.1 -f docker/Dockerfile.runtime ../..
|
||
```
|
||
|
||
3. Скопировать .env:
|
||
```bash
|
||
cp .env.example .env
|
||
$EDITOR .env # подставь свои camera passwords
|
||
```
|
||
|
||
4. Адаптировать `docker-compose.yml`:
|
||
- `parking-cam-ip` → реальный IP камеры
|
||
- `--key cam-parking` → имя по вкусу (должно matche'ить config.yml `cuframes://<key>`)
|
||
- `cam-parking` в Frigate config → так же matched
|
||
|
||
5. Адаптировать `config/config.yml`:
|
||
- детектор (cpu / onnx / tensorrt)
|
||
- пути к media
|
||
- дополнительные камеры если нужно
|
||
|
||
6. Run:
|
||
```bash
|
||
docker compose up -d
|
||
docker logs -f frigate
|
||
# UI: http://localhost:5000 (internal) либо https://localhost:8971 (auth)
|
||
```
|
||
|
||
## Что демонстрирует
|
||
|
||
- Один publisher (`cuframes-pub-parking`) делает 1× NVDEC на parking-камеру
|
||
- Frigate подключается к publisher через `ipc:container:` + `cuframes://` URL
|
||
- Frigate **не** делает свой NVDEC для detect-path — берёт готовые NV12 frames
|
||
|
||
## Что НЕ демонстрирует
|
||
|
||
- Record path — Frigate всё ещё открывает второй RTSP к камере (для архива
|
||
`-c:v copy` mux). v0.2 cuframes решит через encoded packet sharing
|
||
(см. [issue #2](https://git.goldix.org/gx/cuframes/issues/2))
|
||
- Multi-camera setup — добавь больше publisher'ов и camera-blocks в config.yml
|
||
- HA/MQTT интеграция — добавь свой mqtt block
|
||
|
||
## См. также
|
||
|
||
- [docs/integrations/frigate.md](../../docs/integrations/frigate.md) — полный walkthrough
|
||
- [docs/integration.md](../../docs/integration.md) — общая интеграция
|