M.2 Coral with Docker Rootless Frigate
Description
I have Docker Rootless running on Ubuntu Server 20.04.5 LTS with a M.2 Dual Edge TPU.
I can run inference on the host (in line with https://www.coral.ai/docs/m2/get-started/#4-run-a-model-on-the-edge-tpu).
Frigate is stable with CPU detector in my config file but constantly restarts when I try to use my Edge TPU.
I have seen similar topics regarding USB Corals which talk about updating the udev rules to allow non-root users to access USB. I think my udev rules are correct. /etc/udev/rules.d/nano 65-apex.rules:
SUBSYSTEM=="apex",` MODE="0660", GROUP="apex"
I have previously posted this on the Frigate project and the dev there came to the conclusion it's a udev issue and I would be better posting here for support.
https://github.com/blakeblackshear/frigate/issues/4787
Click to expand!
Issue Type
Support
Operating System
Ubuntu
Coral Device
M.2 Accelerator with dual Edge TPU
Other Devices
No response
Programming Language
Other
Relevant Log Output
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-12-23 14:56:20] frigate.app INFO : Starting Frigate (0.10.1-83481af)
Starting migrations
[2022-12-23 14:56:20] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-12-23 14:56:20] peewee_migrate INFO : There is nothing to migrate
[2022-12-23 14:56:20] detector.coral INFO : Starting detection process: 217
[2022-12-23 14:56:20] frigate.app INFO : Output process started: 218
[2022-12-23 14:56:20] frigate.app INFO : Camera processor started for front: 224
[2022-12-23 14:56:20] frigate.app INFO : Capture process started for front: 227
[2022-12-23 14:56:20] frigate.edgetpu INFO : Attempting to load TPU as pci
[2022-12-23 14:56:20] frigate.edgetpu ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Process detector:coral:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, 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 136, in run_detector
object_detector = LocalObjectDetector(
File "/opt/frigate/frigate/edgetpu.py", line 44, in __init__
edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
[2022-12-23 14:56:20] ws4py INFO : Using epoll
[2022-12-23 14:56:21] ws4py INFO : Using epoll
can you please try the commands at: https://github.com/google-coral/pycoral/issues/94#issuecomment-1343839142 and share the logs..
@YellowCushion did you get this working?
@hjonnala
can you please try the commands at: google-coral/pycoral#94 (comment) and share the logs..
not the same person, but i have the exact same problem. here are the logs:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/classify_image.py", line 121, in <module>
main()
File "/root/classify_image.py", line 71, in main
interpreter = make_interpreter(*args.model.split('@'))
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 87, in make_interpreter
delegates = [load_edgetpu_delegate({'device': device} if device else {})]
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 52, in load_edgetpu_delegate
return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {})
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1