question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PCI-e Coral TPU not recognized (possibly proxmox related?)

See original GitHub issue

Describe the bug Since USB corals are out of stock everywhere, I got a M.2 PCIe version. It is detected in proxmox, I passed it through to the VM, but Frigate doesnt seem to detect it and the detector crashes.

Version of frigate 1.13

Config file relevant part:

  coral:
    type: edgetpu
    device: pci 

Frigate container logs

detector.coral                 INFO    : Starting detection process: 34
frigate.edgetpu                INFO    : Attempting to load TPU as pci
frigate.edgetpu                INFO    : No EdgeTPU detected.
Process detector:coral:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 124, in run_detector
    object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
  File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
    edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
  File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.mqtt                   INFO    : MQTT connected
frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...

Computer Hardware

  • OS: proxmox
  • Install method: Addon
  • Virtualization: Proxmox
  • Coral Version: PCIe
  • Network Setup: wired

Additional context Proxmox did detect the coral card, but did not offer to pass through the PCIe device from the GUI. I had to manually add it in the VM config file, and I have no way of knowing 100% certain if that worked. More details here: https://www.reddit.com/r/Proxmox/comments/mo7f99/trouble_passing_through_pcie_device_coral/gu7ge1g/

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nayneyTcommented, May 8, 2021

I can confirm that the driver is now present in v6.0rc1 of HAOS https://www.reddit.com/r/Proxmox/comments/n7nfem/proxmox_hassos_frigate_google_coral_tpu/

3reactions
R5fancommented, May 4, 2021

I just saw this being posted on reddit: https://www.reddit.com/r/Proxmox/comments/n34f8q/proxmox_vm_ubuntu_2004_frigate_2x_google_coral_tpu/

Someone managed to get it working on proxmox, but in a ubuntu VM running a frigate container, and using a M2 to PCIe adapter (My x86 box happens to have the right M.2 slot for my m2 coral and no other PCIe slots anyhow).

Best I can tell, the instructions are essentially the same ones I already followed, aside from an extra line in blacklist-apex.conf options vfio-pci ids=1ac1:089a and using a qm command to pass through the PCIe card instead of editing the conf file in pve. I didnt expect either to make a difference and it doesnt seem to.

I havent tried it again using an ubuntu VM instead of HA OS, I dont expect it to work any better than my last attempt, but I have no idea why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install of PCie drivers for coral TPU | Proxmox Support Forum
Hi, the issue is probably just caused because you never run an actual apt update , so the package index of the newly...
Read more >
Coral TPU, how to install? - ServeTheHome Forums
I put both of them in a PCI-E mini pcie adapter ,and run Frigate (docker) inside an ubuntu VM under proxmox - which...
Read more >
Proxmox >> VM (Ubuntu 20.04) >> Frigate + 2x Google Coral ...
Proxmox >> VM (Ubuntu 20.04) >> Frigate + 2x Google Coral TPU ... I want to try this approach as passthrough to the...
Read more >
Get started with the M.2 or Mini PCIe Accelerator - Coral.ai
2 Accelerator, all you need to do is connect the card to your system, and then install our PCIe driver, Edge TPU runtime,...
Read more >
Proxmox - Virtual Environment | Coral M.2 - Facebook
I'm mapping this to the VM where I'm running the config for the board however it won't recognise it as the coral tpu...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found