Google Coral USB + Frigate + PROXMOX

In my case removing the following line finally made everything work. Must have snuck in from another tutorial:

unprivileged: 1
4 Likes

Has anyone found a way to get around the BUS number changing upon reboot?

Or would using docker on a Proxmox VM rather than LXC and passing through the Coral be a more reliable and persistent way to achieve this?

How do I get the coral USB detected in an LXC container ?
It shows up as Global Unichip Corp. and frigate says it canā€™t find any EdgeTPU

Did you install the runtime on the host machine?

Once you do that and run the test, I think thatā€™s when it changes to the Google Branded device in the lsusb list. I went through this last night.

Iā€™m passing mine like this:
image

1 Like

Hereā€™s something to try.

In the Proxmox Shell run (replace 106 with your LXC ID)
Always remember to use due diligence when sourcing scripts and automation tasks from third-party sites.

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/frigate-support.sh)" -s 106

Reboot the LXC to apply the changes

5 Likes

Found the issue ! I had a trailing slash in the usb mount entry. Thx for the help !

I just installed frigate successfully in a test machine (fairly low powered thin client running a quad core pentium). No Coral yet but I may order a USB one for delivery in a couple of months.

So my PVE CPU usage for a single camera is about 6-8% with some constant motion in the frame (detection is turned off for this test), which is not bad I think given the CPU.

My primary use will be for recording. Before ordering the Coral I wanted to ask would it reduce CPU usage in this instance?

Iā€™m currently looking at doing this to reduce my power consumption and dump my NVR. I have an Optiplex 5070 with i5-9600 and 16GB memory to run it on.

Name of the game here is to get CPU usage and therefore power consumption as low as possible, so Iā€™m going to need to connect both the Coral and likely the iGPU to Frigate.

Iā€™m just wondering, has anyone managed this? Iā€™ve read things elsewhere on the net but havenā€™t been able to draw a decent conclusion.

Iā€™m currently running Hyper-V with HASSOS and some other stuff virtualised but considering switching to Proxmox to make this happen. One thing Iā€™m not understanding though (Iā€™ve never used Proxmox so may be missing the obvious).

Why not just install Docker on the Proxmox host and run Frigate there?

I got it set up on proxmox on my dell usff box, passing thru the intel onboard graphics (nothing great) and the coral, but it took some doing. I ā€œamostā€ got it working a couple of times, but the final best instructions were at the top of this thread, except that I didnā€™t use Portainer. Seems to be running pretty well so far with 7 h264 cameras doing detection on 640x480ish feeds (recording is off the full-res feeds). I personally donā€™t want to run anything on the proxmox host I absolutely donā€™t have to ā€“ I want that to be ā€œpristineā€ and easy to recreate if necessary, and rely on the internal vm/ct backups, not the configuration of the host. Feels like youā€™re violating the whole idea behind the hypervisor/management system to just run it on the hostā€¦ especially if you do end up with another node for failover (for example), although I suspect most home users donā€™t run a cluster outside of experimentation.

2 Likes

Thanks for that - Iā€™ve spun up Proxmox on my machine but not done much else yet.

The rig is for my entire home server needs and Iā€™m struggling with how best to set up shared storage. In this instance, say I have a VM running HASSOS and an LXC container with the Frigate/Coral setup. Do you host your storage somewhere else, like in another VM or within the Frigate container? Or set up something like SMB on the HA server and use that?

EDIT - This is a wider confusion for me than just HA/Frigate, Iā€™m actually struggling with Plex, Radarr, Sonarr etc also (Plex container with all the storage? Downloader container with it all?!). Looking for the least power-hungry, most efficient storage options. It was much simpler with the Windows host doing all the sharing!

EDIT2 - Bind mounts for shared storage. Storage has to be on the host though and havenā€™t worked out how to include that in backups yet.

Thanks.

Hello To all

Iā€™m try to install the Coral TPU in a NIC running proxmox but the device still not appear in the list ā€¦

I already try to change the USB ports and the problem persist

Coral_proxmox

How can I solve this ?

Thank you in advance for your help

I had issues passing through the usb device id etc. The usb port was better but not perfect.
Best thing to do is to pass through the pci device as a whole.

I try also, but the Frigate still not find the device

But the mine is a USB and not a PCI

And in the proxmox the device still appear as unknown ā€¦Coral_proxmox1

Yes mine is usb too
in proxmox i selected this pci device

Which passes thorough the whole usb controller

I try with a PCI as you described but i still having a problem once the frigate still not detecting the device

I already try to change the frigate.yml file as PCI and also as USB but the problem persist


Coral_proxmox2

Thank you

My Docker LXC (running frigate and portainer) seems to use approx 1.7% of my 4 VCPUs on average.

I tried switching back to CPU. My inference speed went from 10 to 50, but my CPU seems to be about the same (1.75% of 4 VCPU).

Thanks, my machine has an intel 605 GPU, but with 2 cameras its like 9% CPU on a proxmox LXC container with detect turned off. So far Iā€™ve been unable to get Frigate to use hardware acceleration even though the GPU is being passed through to docker (as far as I can tell). Iā€™ll probably scrub this and try a bare docker install when I get the chance.

Its still the usb coral but passthrough the usb pci device.
ie pass he whole pci device through that the usb coral is plugged into.

It works! Got mine running three 4mp cameras (Hikvision) so far with three streams set up as per Frigate documentation. Hardware accelerated with iGPU and Coral passed through to a Proxmox LXC container. Two more cameras to add when time allows. Those are 8mp but Iā€™ll likely have the streams set up with the same resolutions so should be pretty much the same load-wise. No automation/HA integration/meaningful events being detected yet, just visible feeds in the Frigate UI. Inference speed is 11-12ms but whether thatā€™s accurate yet I donā€™t know as Iā€™ve not set up to pass anything to the Coral.

Had some quirks and can clear up a few points (Iā€™ll edit this post with more detail when I get chance).

Initial observation and thing I would say is try not to get too hung up on hardware acceleration/decoding of the H264. I didnā€™t really see any change in CPU util by enabling this (and I was able to verify it was doing it with the GPU). Mine at the moment is sitting between an average util of 5-6% on my i5-9600 and the box doesnā€™t yet do anything other than run this container. A bit higher than what I wanted but donā€™t think itā€™s going to do anything thermally or in relation to power consumption. My understanding is that decoding a 720p feed hardly uses any CPU/GPU anyway and itā€™s the watching for motion/passing to the coral that uses up the CPU and this is done on the CPU whether the iGPU decodes the H264 or not.

Iā€™ll post a bit more ASAP.