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.

m.2 coral support

See original GitHub issue

Describe the bug When running in a docker container on a host where the coral is installed as a m.2 device Frigate fails to load. The install instructions appear to have a few extra drivers needed.

I think the differences are gasket-dkms and section 3.

If the user account you’ll be using does not have root permissions, you might need to also add the following udev rule, and then verify that the “apex” group exists and that your user is added to it:

sudo sh -c "echo 'SUBSYSTEM==\"apex\", MODE=\"0660\", GROUP=\"apex\"' >> /etc/udev/rules.d/65-apex.rules"
sudo groupadd apex
sudo adduser $USER apex

Version of frigate 0.8.4

Frigate container logs

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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jasonmhitecommented, Sep 3, 2021

@mcristina422 Which version of the Coral m.2 board were you using? The one with a single Coral or the one with two?

I have the dual version and I’m trying to get it working with the Jetson Nano 4Gb as well but I’m not having any luck. I know I can’t use both with the Jetson’s m.2 slot, but I thought it was supposed to still work as a single. I get the dreaded “failed to initialize”… I can’t even get it to work with the SDK example on the host much less Frigate in docker.

1reaction
mcristina422commented, Jun 28, 2021

Ah, oops, you need to define which detector to use. After adding this to my frigate config it works!

detectors:
  coral:
    type: edgetpu
    device: pci
Read more comments on GitHub >

github_iconTop Results From Across the Web

M.2 Accelerator with Dual Edge TPU - Coral.ai
Performs high-speed ML inferencinglink. Each Edge TPU coprocessor is capable of performing 4 trillion operations per second (4 TOPS), using 2 watts of...
Read more >
M.2 Accelerator with Dual Edge TPU - Coral | Mouser
The small (22.0mm x 30.0mm x 2.8mm) module accelerates TensorFlow Lite modules in a power-efficient manner using 2 watts of power (2 TOPS...
Read more >
Coral M.2 Accelerator | Affordably leverage AI ... - QNAP
Coral M.2 Accelerator. Affordably leverage AI acceleration for faster image recognition on your QNAP NAS ... The AI Revolution continues! QNAP NAS now...
Read more >
Coral M.2 Accelerator with Dual Edge TPU - ASUS
The Coral M.2 Accelerator with Dual Edge TPU is an M.2 module that brings two Edge TPU coprocessors to existing systems and products...
Read more >
Coral M.2 Accelerator with Dual Edge TPU
The Coral M.2 Accelerator with Dual Edge TPU uses an interesting feature of M.2 E-key slots—it uses both lanes that are in the...
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 Reddit Thread

No results found

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