blakeblackshear/frigate · critical · Exception

Make sure to run docker in privileged mode.

Error message

Make sure to run docker in privileged mode.

What it means

The RKNN detector reads /proc/device-tree/compatible to identify the Rockchip SoC; on a normal host this file exists, but inside an unprivileged Docker container device-tree paths are not accessible and FileNotFoundError maps to 'Make sure to run docker in privileged mode.' It is raised from get_soc during detector __init__.

Source

Thrown at frigate/detectors/plugins/rknn.py:93

        self.runner = RKNNModelRunner(
            model_path=model_props["path"],
            model_type=config.model.model_type.value
            if config.model.model_type
            else None,
            core_mask=core_mask,
        )

    def __del__(self):
        if hasattr(self, "runner") and self.runner:
            # The runner's __del__ method will handle cleanup
            pass

    def get_soc(self):
        try:
            with open("/proc/device-tree/compatible") as file:
                soc = file.read().split(",")[-1].strip("\x00")
        except FileNotFoundError:
            raise Exception("Make sure to run docker in privileged mode.") from None

        if soc not in SUPPORTED_RK_SOCS:
            raise Exception(
                f"Your SoC is not supported. Your SoC is: {soc}. Currently these SoCs are supported: {SUPPORTED_RK_SOCS}."
            )

        return soc

    def parse_model_input(self, model_path, soc):
        model_props = {}

        # find out if user provides his own model
        # user provided models should be a path and contain a "/"
        if "/" in model_path:
            model_props["preset"] = False

            # Check if this is an ONNX model or model without extension that needs conversion
            if model_path.endswith(".onnx") or not os.path.splitext(model_path)[1]:

View on GitHub (pinned to ca18b8dc13)

Solutions

  1. Run the Frigate container in privileged mode (docker run --privileged / compose privileged: true) as Frigate Rockchip docs require
  2. Alternatively bind-mount /proc/device-tree (and the NPU devices) into the container if privileged mode is not allowed
  3. Confirm you are on supported Rockchip hardware; otherwise pick another detector type

Example fix

# docker-compose.yml
# before
services:
  frigate: {}
# after
services:
  frigate:
    privileged: true
    # plus mapped /dev/dri, /dev/dma_heap etc per docs
Defensive patterns

Strategy: validation

Validate before calling

import os

def can_read_soc() -> bool:
    return os.path.exists('/proc/device-tree/compatible')

Try / catch

try:
    detector = LocalDetector(detector_config)
except Exception as e:
    if 'privileged mode' in str(e):
        raise SystemExit('Restart Frigate container with privileged: true') from None
    raise

Prevention

When it happens

Trigger: Starting the RKNN detector in a container without privileged mode or without the /proc/device-tree bind mount, so open('/proc/device-tree/compatible') raises FileNotFoundError.

Common situations: Running the Frigate container with default (non-privileged) security settings on Rockchip hardware; docker run without --privileged; Kubernetes pod missing privileged securityContext; compose file missing privileged: true.

Related errors


AI-assisted analysis of blakeblackshear/frigate@ca18b8dc13 (2026-08-27). Data as JSON: /api/errors/90d4d650840342bc. Report an issue: GitHub.