frigate_nvr_installation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| frigate_nvr_installation [2024/12/06 15:48] – [Docker Installation] 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 / | ||
| - | |||
| - | < | ||
| - | 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: | ||
| - | - http:// | ||
| - | BackCam: | ||
| - | - http:// | ||
| - | Doorbell: | ||
| - | - http:// | ||
| - | |||
| - | cameras: | ||
| - | FrontCam: | ||
| - | ffmpeg: | ||
| - | inputs: | ||
| - | - path: | ||
| - | http:// | ||
| - | roles: | ||
| - | - detect | ||
| - | - path: rtsp:// | ||
| - | input_args: preset-rtsp-restream | ||
| - | roles: | ||
| - | - record | ||
| - | motion: | ||
| - | mask: | ||
| - | - 896, | ||
| - | objects: | ||
| - | track: | ||
| - | - person | ||
| - | - car | ||
| - | - bicycle | ||
| - | - motorcycle | ||
| - | zones: | ||
| - | front_drive: | ||
| - | coordinates: | ||
| - | objects: | ||
| - | - person | ||
| - | - car | ||
| - | - bicycle | ||
| - | - motorcycle | ||
| - | |||
| - | BackCam: | ||
| - | ffmpeg: | ||
| - | inputs: | ||
| - | - path: | ||
| - | http:// | ||
| - | roles: | ||
| - | - detect | ||
| - | - path: rtsp:// | ||
| - | input_args: preset-rtsp-restream | ||
| - | roles: | ||
| - | - record | ||
| - | motion: | ||
| - | mask: | ||
| - | - 896, | ||
| - | objects: | ||
| - | track: | ||
| - | - person | ||
| - | - cat | ||
| - | - bird | ||
| - | zones: | ||
| - | back_garden: | ||
| - | coordinates: | ||
| - | objects: | ||
| - | - person | ||
| - | - cat | ||
| - | - bird | ||
| - | |||
| - | Doorbell: | ||
| - | ffmpeg: | ||
| - | inputs: | ||
| - | - path: | ||
| - | http:// | ||
| - | roles: | ||
| - | - detect | ||
| - | - path: rtsp:// | ||
| - | input_args: preset-rtsp-restream | ||
| - | roles: | ||
| - | - record | ||
| - | motion: | ||
| - | mask: | ||
| - | - 896, | ||
| - | objects: | ||
| - | track: | ||
| - | - person | ||
| - | zones: | ||
| - | front_porch: | ||
| - | coordinates: | ||
| - | objects: | ||
| - | - person | ||
| - | |||
| - | birdseye: | ||
| - | enabled: true | ||
| - | mode: motion | ||
| - | |||
| - | record: | ||
| - | enabled: true | ||
| - | retain: | ||
| - | days: 14 | ||
| - | mode: motion | ||
| - | events: | ||
| - | required_zones: | ||
| - | - front_drive | ||
| - | - front_porch | ||
| - | - back_garden | ||
| - | retain: | ||
| - | default: 90 | ||
| - | 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 / | ||
| - | </ | ||
frigate_nvr_installation.1733496498.txt.gz · Last modified: by mark_scottworld.net
