frigate_nvr_installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
frigate_nvr_installation [2025/02/09 17:06] – mark_scottworld.net | frigate_nvr_installation [2025/04/18 13:40] (current) – removed mark_scottworld.net | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Frigate NVR Installation ====== | ||
- | |||
- | ===== Docker Installation ===== | ||
- | |||
- | Download and save the Docker repository signing key: | ||
- | |||
- | curl -fsSL https:// | ||
- | | ||
- | Add the Docker repository in / | ||
- | |||
- | deb [arch=amd64 signed-by=/ | ||
- | | ||
- | Allow unattended updates from this repository by add to / | ||
- | |||
- | < | ||
- | Unattended-Upgrade:: | ||
- | // Append to end of existing entries | ||
- | " | ||
- | }; | ||
- | </ | ||
- | |||
- | Update the repositories and install the package: | ||
- | |||
- | < | ||
- | apt update | ||
- | apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin | ||
- | </ | ||
- | |||
- | Check all is working with: | ||
- | |||
- | docker version | ||
- | | ||
- | Stop the services | ||
- | |||
- | < | ||
- | systemctl stop docker.service | ||
- | systemctl stop docker.socket | ||
- | systemctl stop containerd.service | ||
- | </ | ||
- | |||
- | Move the Docker root directory: (optional) | ||
- | |||
- | mv / | ||
- | | ||
- | Edit the systemd service for Docker: | ||
- | |||
- | systemctl edit docker.service (only if moving) | ||
- | | ||
- | Add the following to the top of the override file: | ||
- | |||
- | < | ||
- | [Service] | ||
- | ExecStart= | ||
- | ExecStart=/ | ||
- | </ | ||
- | | ||
- | Restart Docker: | ||
- | |||
- | systemctl daemon-reload | ||
- | systemctl start docker.service | ||
- | | ||
- | Check it still works with: | ||
- | |||
- | docker run hello-world | ||
- | | ||
- | ===== GPU Hardware Acceleration ===== | ||
- | |||
- | Download and save the NVIDIA repository signing key: | ||
- | |||
- | curl -fsSL https:// | ||
- | | ||
- | Add the Docker repository in / | ||
- | |||
- | deb [signed-by=/ | ||
- | | ||
- | Allow unattended updates from this repository by add to / | ||
- | |||
- | < | ||
- | Unattended-Upgrade:: | ||
- | " | ||
- | }; | ||
- | </ | ||
- | |||
- | Update the repositories and install the package: | ||
- | |||
- | < | ||
- | apt update | ||
- | apt install nvidia-docker2 | ||
- | </ | ||
- | |||
- | Restart Docker: | ||
- | |||
- | systemctl restart docker.service | ||
- | | ||
- | |||
- | |||
- | ===== Frigate ===== | ||
- | |||
- | If using ZFS, create a filesystem to store the video recordings (not used currently) | ||
- | |||
- | zfs create -o recordsize=1M -o compression=off -o quota=256G data/cctv | ||
- | | ||
- | Create a configuration directory for Frigate: | ||
- | |||
- | mkdir / | ||
- | | ||
- | Create / | ||
- | |||
- | < | ||
- | version: " | ||
- | services: | ||
- | frigate: | ||
- | container_name: | ||
- | privileged: true # this may not be necessary for all setups | ||
- | restart: unless-stopped | ||
- | image: ghcr.io/ | ||
- | network_mode: | ||
- | deploy: | ||
- | resources: | ||
- | reservations: | ||
- | devices: | ||
- | - driver: nvidia | ||
- | count: 1 | ||
- | capabilities: | ||
- | shm_size: " | ||
- | # | ||
- | # - / | ||
- | volumes: | ||
- | - / | ||
- | # - / | ||
- | - / | ||
- | - / | ||
- | - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear | ||
- | target: /tmp/cache | ||
- | tmpfs: | ||
- | size: 1000000000 | ||
- | ports: | ||
- | - " | ||
- | - " | ||
- | - " | ||
- | - " | ||
- | environment: | ||
- | # - FRIGATE_RTSP_PASSWORD: | ||
- | - YOLO_MODELS=yolov7-tiny-416 | ||
- | </ | ||
- | |||
- | Create / | ||
- | |||
- | < | ||
- | version: 0.14 | ||
- | |||
- | mqtt: | ||
- | host: mqtt.scottworld.net | ||
- | user: scottbroker | ||
- | password: mqtt1 | ||
- | |||
- | #detectors: | ||
- | # coral: | ||
- | # type: edgetpu | ||
- | # device: usb | ||
- | |||
- | detectors: | ||
- | tensorrt: | ||
- | type: tensorrt | ||
- | device: 0 | ||
- | |||
- | model: | ||
- | path: / | ||
- | input_tensor: | ||
- | input_pixel_format: | ||
- | width: 416 | ||
- | height: 416 | ||
- | |||
- | ffmpeg: | ||
- | hwaccel_args: | ||
- | input_args: preset-http-reolink | ||
- | output_args: | ||
- | record: preset-record-generic-audio-copy | ||
- | |||
- | timestamp_style: | ||
- | format: ' | ||
- | |||
- | go2rtc: | ||
- | streams: | ||
- | FrontCam: | ||
- | - ffmpeg: | ||
- | BackCam: | ||
- | - ffmpeg: | ||
- | Doorbell: | ||
- | - ffmpeg: | ||
- | |||
- | cameras: | ||
- | FrontCam: | ||
- | ffmpeg: | ||
- | inputs: | ||
- | - path: | ||
- | http:// | ||
- | roles: | ||
- | - detect | ||
- | - path: rtsp:// | ||
- | input_args: preset-rtsp-restream | ||
- | roles: | ||
- | - record | ||
- | motion: | ||
- | mask: 1, | ||
- | objects: | ||
- | track: | ||
- | - person | ||
- | - car | ||
- | - bicycle | ||
- | - motorcycle | ||
- | zones: | ||
- | front_drive: | ||
- | coordinates: | ||
- | objects: | ||
- | - person | ||
- | - car | ||
- | - bicycle | ||
- | - motorcycle | ||
- | inertia: 3 | ||
- | loitering_time: | ||
- | review: | ||
- | alerts: | ||
- | required_zones: | ||
- | - front_drive | ||
- | |||
- | BackCam: | ||
- | ffmpeg: | ||
- | inputs: | ||
- | - path: | ||
- | http:// | ||
- | roles: | ||
- | - detect | ||
- | - path: rtsp:// | ||
- | input_args: preset-rtsp-restream | ||
- | roles: | ||
- | - record | ||
- | motion: | ||
- | mask: 1, | ||
- | objects: | ||
- | track: | ||
- | - person | ||
- | - cat | ||
- | - bird | ||
- | zones: | ||
- | back_garden: | ||
- | coordinates: | ||
- | objects: | ||
- | - person | ||
- | - cat | ||
- | - bird | ||
- | inertia: 3 | ||
- | loitering_time: | ||
- | review: | ||
- | alerts: | ||
- | required_zones: | ||
- | - back_garden | ||
- | |||
- | Doorbell: | ||
- | ffmpeg: | ||
- | inputs: | ||
- | - path: | ||
- | http:// | ||
- | roles: | ||
- | - detect | ||
- | - path: rtsp:// | ||
- | input_args: preset-rtsp-restream | ||
- | roles: | ||
- | - record | ||
- | motion: | ||
- | mask: 1, | ||
- | objects: | ||
- | track: | ||
- | - person | ||
- | zones: | ||
- | front_porch: | ||
- | coordinates: | ||
- | objects: person | ||
- | inertia: 3 | ||
- | loitering_time: | ||
- | review: | ||
- | alerts: | ||
- | required_zones: | ||
- | - front_porch | ||
- | |||
- | birdseye: | ||
- | enabled: true | ||
- | mode: motion | ||
- | |||
- | record: | ||
- | sync_recordings: | ||
- | enabled: true | ||
- | retain: | ||
- | days: 7 | ||
- | mode: motion | ||
- | events: | ||
- | retain: | ||
- | default: 28 | ||
- | mode: active_objects | ||
- | |||
- | snapshots: | ||
- | enabled: true | ||
- | |||
- | </ | ||
- | |||
- | Start Frigate with: | ||
- | |||
- | docker compose -f / | ||
- | | ||
- | Visit the Frigate interface via: | ||
- | |||
- | http:// | ||
- | | ||
- | Update the Image with | ||
- | |||
- | docker compose -f / | ||
- | docker compose -f / | ||
- | docker compose -f / | ||
- | | ||
- | docker image prune | ||
- | docker container prune | ||
- | (on an upgrade) |
frigate_nvr_installation.1739117175.txt.gz · Last modified: 2025/02/09 17:06 by mark_scottworld.net