[SOLVED] Proxmox 7.0-13 + Ubuntu 20.04.3 LXC + ZoneMinder Event Server + USB Coral TPU - Help!

crider17

New Member
Mar 7, 2021
19
0
1
55
Hi All -

I use Zoneminder to drive my IP cams and I'd like to setup ZM Event Server for object recognition. I'm running Proxmox on an older Optiplex 7010 (i5 CPU) so wanted the TPU to help with CPU load. However, I am not able to successfully access my USB Coral TPU device within my Ubuntu container (where ZM and ZM Event is loaded) via the test scripts provided by Google.

I get "ValueError: Failed to load delegate from libedgetpu.so.1" - Which I've learned means that the drive cannot acces the TPU.

I've installed the device as instructed here: https://coral.ai/docs/accelerator/get-started/#requirements with no problems.

It shows up with a lsusb command (both within my container and on the pve) as:

Bus 003 Device 004: ID 1a6e:089a Global Unichip Corp. - which I think is also a problem. It should show as Google Coral TPU I think.

It's not as easy as "mounting" it using the Proxmox GUI so I'm struggling with how I can access this within my LXC. I have a feeling I need to modify my config somehow but I'm not sure how. I've tried several things but no luck.

Anyone have any experience with this or any ideas for me to try. Thank you in advance!
 
Hi All -

I use Zoneminder to drive my IP cams and I'd like to setup ZM Event Server for object recognition. I'm running Proxmox on an older Optiplex 7010 (i5 CPU) so wanted the TPU to help with CPU load. However, I am not able to successfully access my USB Coral TPU device within my Ubuntu container (where ZM and ZM Event is loaded) via the test scripts provided by Google.

I get "ValueError: Failed to load delegate from libedgetpu.so.1" - Which I've learned means that the drive cannot acces the TPU.

I've installed the device as instructed here: https://coral.ai/docs/accelerator/get-started/#requirements with no problems.

It shows up with a lsusb command (both within my container and on the pve) as:

Bus 003 Device 004: ID 1a6e:089a Global Unichip Corp. - which I think is also a problem. It should show as Google Coral TPU I think.

It's not as easy as "mounting" it using the Proxmox GUI so I'm struggling with how I can access this within my LXC. I have a feeling I need to modify my config somehow but I'm not sure how. I've tried several things but no luck.

Anyone have any experience with this or any ideas for me to try. Thank you in advance!

You must setup you lxc container.

This github can help you.

Don't use Google Coral USB in a VM, only in a lxc container works.

I use Home Assistant in a VM, and Frigate into a lxc container with Google Coral USB.

No way Google Coral in a VM, maybe is a driver issue, and there is also a fix from google, but i don't understand how to.

Anyway in a LXC works, so you can do that.
 
OK, It is now working! This link that helped:

https://issueexplorer.com/issue/blakeblackshear/frigate/1807

There is a lot coming at you in there but via some trial and error I landed on these entries in my config that seems to be working:

lxc.cgroup2.devices.allow: c 189:* rwm

lxc.mount.entry: /dev/bus/usb/003/ dev/bus/usb/003/ none bind,optional,create=dir 0,0

lxc.cgroup2.devices.allow: a

lxc.mount.auto: cgroup:rw

Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!