frigate-support
Prepare an LXC container for Frigate by passing GPU, framebuffer and USB device nodes into it through an autodev hook.
frigate-support.sh adds an lxc.hook.autodev entry to a container's configuration. At every start of the container the hook copies a fixed set of host device nodes into the container's /dev, which Frigate needs for hardware decoding and USB accelerators. It is not listed on the website.
Source: tools/pve/frigate-support.sh.
Run
In the Proxmox VE host shell, as root:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/frigate-support.sh)"Prompts
| Prompt | Input | Effect |
|---|---|---|
This will Prepare a LXC Container for Frigate. Proceed (y/n)? | y / n | n exits. |
| "Select a container to add support:" (radio list of all containers) | One container | The container to change. The list is shown again until one is selected; leave with Ctrl+C. |
Devices
| Major:minor | Device (comment in the script) |
|---|---|
1:1 | mem |
29:0 | fb0 |
188:* | ttyUSB* |
189:* | bus/usb/* |
226:0 | card0 |
226:128 | renderD128 |
What it changes
In /etc/pve/lxc/<id>.conf the script removes every line that contains autodev and appends:
lxc.autodev: 1
lxc.hook.autodev: bash -c '<hook>'The hook searches /sys/dev/char for the devices above and copies each device node and its /dev symlinks (from udevadm info) into the container's root filesystem.
Reboot the container to apply the change.
Undo
Remove the two lines from /etc/pve/lxc/<id>.conf and restart the container.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
COMMUNITY_SCRIPTS_CORE_URL | https://raw.githubusercontent.com/community-scripts/core/main | Base URL the script loads api/api.func from. |
Limits
- The script only passes devices in. It does not install Frigate or any driver.
- It does not check whether the container is privileged.
1:1gives the container access to the host's/dev/mem.- Devices are copied when the container starts. A USB device plugged in later appears only after the next container start.
- An existing
lxc.autodevorlxc.hook.autodevline is replaced. - A scratch file named
CTID.confis left in the directory you started the script from.