Closed GregHilston closed 10 months ago
You'll need to passthrough the USB port or PCI device: https://community.home-assistant.io/t/google-coral-usb-frigate-proxmox/383737/36
Hey @idontcare99999 , thanks for the advice, but I believe I've done that? See the section above titled Any other information that may be helpful
, where I described doing that and attached a screenshot. I'm also not using HA with Frigate right now.
Are you suggesting that I try to pass the USB device down via the PCI approach in Proxmox?
Thanks for your help, as I appreciate your guidance a lot
edit: this post suggests why my Debian Cloud Init VM is not showing any devices when i run $ lsusb
. Additionally, /dev/bus/usb
does not exist... I'm still digging, trying to figure out how to solve this...
Yes, the comments in the link I provided outlines the journey from attempting to use the USB ID, to the USB port, to the PCI ID of the controller. You cannot use the USB ID since it changes from one value after to reboot to another value after initializing the coral device. Additionally, in my experience, passing through USB devices on proxmox was noticeably slower and often errored out; I would recommend lxc which is what I am using now.
Okay, I follow
I think my version of Debian does not even support USBs... Hence the no output from lsusb. I'll give the pcie approach one last boy scouts try, before I throw in the towel and try the lxc approach as you mentioned.
Thanks again for your help. Ill report back and close the issue once I have some solution.
I ended up getting this working in a Proxmox LXC, which can now see my coral USB. i wish I could have gotten it working in my original Debian VM, but this is a great alternative :)
Thanks again for your help @idontcare99999
here's a brief ugly writeup form my personal notes. this is not complete, but may help someone in the future:
I had a pretty hard time getting the Coral TPU USB to work with Frigate. My first mistake was that my Debian VM that runs my Docker service was unable to interact with USBs. So we moved to an LXC approach, that runs Frigate in a Docker container.
There is no automatic deployment for this right now. Overall, we use Proxmox to interact with the Coral, passthrough it to the LXC for Frigate which is running in Docker. We mount a NAS share to a Proxmox mount point, pass that down to LXC and store things there.Here's the current manual process:
/etc/fstab
in the Proxmox host to something like this: /etc/fstab
: <NAS IP>:/mnt/user/webcam /root/unraid-webcam-mountpoint nfs rw 0 0
, then we run $ sudo mount -a
, to mount it now.Docker - Kubernetes > Docker LXC
, as this will install Docker, Docker compose, and portainer for us. At the time of writing this, you run $ bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker.sh)"
.config.yml
and docker-compose.yaml
file to some new /root/frigate
directoryetc/pve/lxc/102.conf
(where 102 is the LXC container ID), to be proxmox-pve-lxc.conf
# apt install pve-headers vim tmux -y
# wget -qO - https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/google.gpg --import -
# rm /etc/apt/trusted.gpg.d/google.gpg~
# chmod 644 /etc/apt/trusted.gpg.d/google.gpg
# echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
# apt-get update
# apt-get install gasket-dkms libedgetpu1-std
$ lsusb
on Proxmox to se where the Google Coral is, and replace lxc.mount.entry: /dev/bus/usb/002/ dev/bus/usb/002/ none bind,optional,create=dir 0,0
, specifically the /dev/bus/usb/002/
with the correct bus. The command lsusb
, may show Bus 002 Device 007: ID 1a6e:089a Global Unichip Corp.
or Bus 002 Device 010: ID 18d1:9302 Google Inc.
$ docker compose up -d
and verify http://<LXC IP>:5000/
, or whatever the IP is, can say speak to the Moto X4 camera. Additionally, check the logs to see that it found the Coral, or does not report that it failed to find.# systemctl enable docker
Describe the problem you are having
When bringing up Frigate, I'm seeing the error output that I shared below in the
Relevant log output section
.I'm not positive that this is a Frigate issue, but rather that my brand new Coral USB is either damaged, using a damaged USB port, or not playing nicely with my Proxmox VM...
Any advice would be wildly appreciated :)
Version
0.12.1-367d724
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
Operating system
Proxmox
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
I'm running proxmox, with a
debian-11-genericcloud-am64
operating system VM, which is what is housing my Frigate docker container.I have a Coral USB passed through to the VM through the Proxmox web UI:
however, I have failed to both get Frigate to start, nor have I successfully gotten the
classify_image.py
with the parrot input image to work either. For example, running the following on the proxmox host or in my Debian VM, results in this output:As I continue to debug this, I'm beginning to think that this is not a Frigate issue, but I figured asking here for help may be fruitful.