PCI-e EdgeTPU (Coral AI) issues

sanj23

New Member
Apr 26, 2023
3
0
1
I am getting "ValueError: Failed to load delegate from libedgetpu.so.1.0" repeatedly on frigate on docker inside LXC container on Proxmox host. I also Tried on a VM (with PCI bypass, and got the same error).

AFAIK TPU is detected on the system (both proxmox and LXC) I get the following output on LXC

Code:
root@pve:# ls /dev/apex_0
/dev/apex_0
root@pve:# lspci -nn | grep 089a
01:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]


LXC config

Code:
arch: amd64
cores: 4
features: nesting=1
hostname: frigate2
memory: 1024
mp0: STORE:vm-109-disk-0,mp=/mnt/STORE/,size=8G
net0: name=eth0,bridge=vmbr0,firewall=1,gw=10.0.18.1,hwaddr=AE:7F:40:F1:51:CA,ip=10.0.18.225/24,type=veth
ostype: debian
rootfs: VM:vm-109-disk-0,size=8G
swap: 512
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.apparmor.profile: unconfined
lxc.cgroup2.devices.allow: a
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0
lxc.mount.entry: /dev/apex_0 dev/apex_0 none bind,optional,create=file 0, 0
lxc.cap.drop:
lxc.mount.auto: cgroup:rw

CPU(s)

4 x Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz (1 Socket)
Kernel Version

Linux 5.15.102-1-pve #1 SMP PVE 5.15.102-1 (2023-03-14T13:48Z)
PVE Manager Version

pve-manager/7.4-3/9002ab8a

I am using Mini PCIe Accelerator (G650-04528-01 ) any help will be greatly appreciated. Above error is from frigate on docker but I get the same error when I try to run the sample project.
 
Last edited:
I am also getting following with dmesg | grep -i apex


Code:
root@FrigateLXC:~# dmesg | grep -i apex
[   18.429956] apex 0000:04:00.0: enabling device (0100 -> 0102)
[   23.586928] apex 0000:04:00.0: Apex performance not throttled due to temperature
root@FrigateLXC:~# dmesg | grep -i apex^C
 
I think I figured it out. Permissions issue. Adding the following in /etc/pve/lxc/102.conf got me over the hump:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.cgroup2.devices.allow: c 120:* rwm
lxc.cgroup2.devices.allow: a

I referenced frigate discussion 1111.
Can now run the test steps from the coralai install instructions and infer the macaw in the lxc.
 
  • Like
Reactions: sanj23
I think I figured it out. Permissions issue. Adding the following in /etc/pve/lxc/102.conf got me over the hump:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.cgroup2.devices.allow: c 120:* rwm
lxc.cgroup2.devices.allow: a

I referenced frigate discussion 1111.
Can now run the test steps from the coralai install instructions and infer the macaw in the lxc.
That fixed it for me , thank you so much <3