Google Coral USB + Frigate + PROXMOX

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.

would appreciate it. How do you tell if hardware acceleration is being used? I have the same issue where CPU usage is the same regardless of what settings are in the LXC conf files. I don’t have a coral (yet) so am just looking at re-encoding and recording and have detection turned off.

EDIT: I finally managed to get hardware acceleration working (as shown in intel_gpu_top) but it has made a difference (going from 5% to about 3.5% CPU on my pentium J5005) with no detection of course.

Intel_gpu_top is how I checked too. Didn’t really make much difference for me though. Mine is sat at around 8% when it’s quiet but we live next to a school… When the traffic turns up for that it hits about 35%! With detection on obviously.

1 Like

I haven’t quite worked out yet though:

If detection is off, all motion detection is off? So if recording is set to motion, recording is off as well?

If recording is off, is it just event recording, 247 recording or both that gets turned off?!

I have just finished setting up all this “stuff”, not without struggling a lot…
But it seems working very very nice.
I don’t know much about lxc, proxmox and mount points and now i have a big problem about clips files.
The question is: where are them located? And how to let them out from the lxc container and make them recording on a lvm disk?

Has anyone tried this manual in the last time? I got alwaysGlobal Unichip Corp

Yes and it works. Global Unichip Corp will change to Google Inc when you first run Frigate with TPU config on it. Then restart Proxmox and you will see Google Inc against Global Unichip Corp