mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-18 07:29:45 +00:00
axelera: expose Metis colon-name device node and image deps for runtime enumeration
The Axelera runtime enumerates Metis cards via the colon-separated node name created by the vendor udev rule on the host (e.g. /dev/metis-0:1:0) and probes kernel state with lsmod/lspci. Containers only receive the raw /dev/metis-0-1-0 node, so the detector never found the card. - init-devices: create /dev/metis-BB:DD:F aliases for each Metis node - install_deps: add kmod and pciutils so the runtime's driver check works
This commit is contained in:
parent
950ea9406c
commit
8fbf471794
@ -10,7 +10,7 @@ apt-get -qq install --no-install-recommends -y \
|
||||
gnupg \
|
||||
wget \
|
||||
lbzip2 \
|
||||
procps vainfo acl \
|
||||
procps vainfo acl kmod pciutils \
|
||||
unzip locales tzdata libxml2 xz-utils \
|
||||
python3.11 \
|
||||
curl \
|
||||
|
||||
@ -98,6 +98,23 @@ if [[ -d /dev/bus/usb ]]; then
|
||||
done < <(find /dev/bus/usb -type d -print0)
|
||||
fi
|
||||
|
||||
# The Axelera runtime enumerates Metis cards by the colon-separated node name
|
||||
# that the vendor's udev rules create on a host (e.g. /dev/metis-0:1:0, a
|
||||
# symlink to the raw /dev/metis-0-1-0). Containers get the raw node only,
|
||||
# because docker never copies symlinks and there is no udev here, so recreate
|
||||
# the alias the runtime looks for.
|
||||
if compgen -G "/dev/metis-*-*-*" > /dev/null; then
|
||||
for node in /dev/metis-*-*-*; do
|
||||
[[ -c "$node" ]] || continue
|
||||
base=${node##*/}
|
||||
suffix=${base#metis-}
|
||||
alias="/dev/metis-${suffix//-/:}"
|
||||
if [[ ! -e "$alias" ]]; then
|
||||
ln -s "$base" "$alias" && echo "[INFO] device access: created Metis alias ${alias}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$failed" -gt 0 ]]; then
|
||||
echo "[INFO] device access: granted ${granted} node(s), ${failed} failed"
|
||||
elif [[ "$granted" -gt 0 ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user