Fix RKNN default perms for binaries and libraries (#25000)

* Fix RKNN default perms for binaries and libraries

* Add docs to handle specific rknn mounts
This commit is contained in:
Nicolas Mowen
2026-11-17 15:03:11 -06:00
committed by GitHub
parent 97f2096534
commit 8a7d89170b
6 changed files with 199 additions and 21 deletions
+2
View File
@@ -385,6 +385,8 @@ One Docker specific trap: published ports are inserted ahead of the host firewal
`telemetry.stats.network_bandwidth` uses nethogs, which needs `CAP_NET_ADMIN` and `CAP_NET_RAW` and therefore root. The stat is turned off automatically when Frigate isn't running as root, with one warning in the log. Use `FRIGATE_ROOT_SERVICES=frigate` (or `FRIGATE_RUN_AS_ROOT=true`) if you need it.
Rockchip NPU and GPU usage come from `/sys/kernel/debug`, which the kernel makes readable only by root. To keep these stats, bind the two load files into the container as shown in the [Rockchip installation steps](/frigate/installation#rockchip-platform). Without them, Frigate logs one warning and leaves the stats out.
go2rtc's ffmpeg processes no longer appear in Intel GPU stats. Frigate reads per-process GPU usage from `/proc/<pid>/fdinfo`, which the kernel won't let one user read for another user's processes, so anything go2rtc spawns is invisible to it. Overall GPU utilization is unaffected.
If you mount your own TLS certificate at `/etc/letsencrypt/live/frigate`, the private key has to be readable by the runtime user, which runs nginx. Frigate hands the key to that user at startup if the mount is writable; on a read-only mount, make the key readable by uid 1000 (or your `PUID`) yourself.
+21
View File
@@ -525,6 +525,27 @@ or add these options to your `docker run` command:
--volume /sys/:/sys/:ro
```
Frigate reads NPU and GPU (RGA) usage from `/sys/kernel/debug`, which the kernel makes readable only by root. Frigate's services don't run as root, so to show these stats on the System page, bind the two load files into the container. This works with or without `privileged: true`:
```yaml
volumes:
- /sys/kernel/debug/rknpu/load:/rockchip/rknpu/load:ro
- /sys/kernel/debug/rkrga/load:/rockchip/rkrga/load:ro
```
or for `docker run`:
```
--volume /sys/kernel/debug/rknpu/load:/rockchip/rknpu/load:ro \
--volume /sys/kernel/debug/rkrga/load:/rockchip/rkrga/load:ro
```
These lines are optional, and everything else works without them. Only add a line for a file that exists on your host, because Docker won't start the container if one is missing. Check with:
```
$ sudo ls /sys/kernel/debug/rknpu/load /sys/kernel/debug/rkrga/load
```
#### Configuration
Next, you should configure [hardware object detection](/configuration/object_detectors#rockchip-platform) and [hardware video processing](/configuration/hardware_acceleration_video#rockchip-platform).