Bytelake / Coral-in-LXC

How to pass or share a Google Coral M.2 to an LXC container in Proxmox
19 stars 2 forks source link

No EdgeTPU was detected #3

Open rantanplan1980 opened 12 months ago

rantanplan1980 commented 12 months ago
          Hallo zusammen,

Ich habe ein Thema mit einem LXC Container in dem ich FRIGATE laufen lassen möchte. Frigate habe ich soweit installier und funktioniert mit folgender config.yaml

Config.yaml: image

`mqtt: host: 192.168.1.150 user: Benutzername password: Passwort cameras: Kellerfrigate: ffmpeg: inputs:

Nun hab ich meinen CORAL TPU an einen USB3 angeschlossen und bin ich wie folgt vorgegangen:

https://github.com/Bytelake/Coral-in-LXC (Danke für deine Anleitung)

Config hab ich auch entsprechend angepasst.

image

Bekomme aber folgende Fehlermeldung:

023-10-01 10:09:30.664468146 [INFO] Starting Frigate... 2023-10-01 10:09:31.549576998 [2023-10-01 10:09:31] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-10-01 10:09:31.563690020 [2023-10-01 10:09:31] peewee_migrate INFO : Starting migrations 2023-10-01 10:09:31.567443928 [2023-10-01 10:09:31] peewee_migrate INFO : There is nothing to migrate 2023-10-01 10:09:31.580563362 [2023-10-01 10:09:31] detector.coral INFO : Starting detection process: 420 2023-10-01 10:09:31.581223240 [2023-10-01 10:09:31] frigate.app INFO : Output process started: 422 2023-10-01 10:09:31.582808157 [2023-10-01 10:09:31] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-10-01 10:09:31.583630039 [2023-10-01 10:09:31] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors. 2023-10-01 10:09:31.586401991 Process detector:coral: 2023-10-01 10:09:31.586404832 Traceback (most recent call last): 2023-10-01 10:09:31.586406198 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate 2023-10-01 10:09:31.586409310 delegate = Delegate(library, options) 2023-10-01 10:09:31.586411005 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in init 2023-10-01 10:09:31.586424007 raise ValueError(capture.message) 2023-10-01 10:09:31.586425135 ValueError 2023-10-01 10:09:31.586426074
2023-10-01 10:09:31.586427615 During handling of the above exception, another exception occurred: 2023-10-01 10:09:31.586428549
2023-10-01 10:09:31.586429536 Traceback (most recent call last): 2023-10-01 10:09:31.586430663 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap 2023-10-01 10:09:31.586448141 self.run() 2023-10-01 10:09:31.586449419 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run 2023-10-01 10:09:31.586450499 self._target(*self._args, **self._kwargs) 2023-10-01 10:09:31.586451592 File "/opt/frigate/frigate/object_detection.py", line 98, in run_detector 2023-10-01 10:09:31.586464632 object_detector = LocalObjectDetector(detector_config=detector_config) 2023-10-01 10:09:31.586465838 File "/opt/frigate/frigate/object_detection.py", line 52, in init 2023-10-01 10:09:31.586466986 self.detect_api = create_detector(detector_config) 2023-10-01 10:09:31.586468112 File "/opt/frigate/frigate/detectors/init.py", line 24, in create_detector 2023-10-01 10:09:31.586469110 return api(detector_config) 2023-10-01 10:09:31.586470235 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 37, in init 2023-10-01 10:09:31.586471355 edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config) 2023-10-01 10:09:31.586485756 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate 2023-10-01 10:09:31.586486960 raise ValueError('Failed to load delegate from {}\n{}'.format( 2023-10-01 10:09:31.586488066 ValueError: Failed to load delegate from libedgetpu.so.1.0 2023-10-01 10:09:31.586489014
2023-10-01 10:09:31.589209129 [2023-10-01 10:09:31] frigate.app INFO : Camera processor started for Kellerfrigate: 425 2023-10-01 10:09:31.589213701 [2023-10-01 10:09:31] frigate.app INFO : Capture process started for Kellerfrigate: 427 2023-10-01 10:09:31.591814018 [2023-10-01 10:09:31] frigate.comms.dispatcher INFO : Turning off detection for Kellerfrigate

root@frigate:~# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1a6e:089a Global Unichip Corp. Bus 001 Device 005: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Kann mir jemand sagen wie ich hier eine Lösung finden kann. Vielen Dank!

Originally posted by @rantanplan1980 in https://github.com/Bytelake/Coral-in-LXC/issues/2#issuecomment-1742003357

rantanplan1980 commented 12 months ago

features: nesting=1 lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.apparmor.profile: unconfined lxc.cgroup2.devices.allow: a lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0 lxc.mount.entry: /dev/apex_0 dev/apex_0 none bind,optional,create=file 0, 0 lxc.cap.drop: lxc.mount.auto: cgroup:rw

--> Hatte das nicht sauber implementiert...

Bytelake commented 11 months ago

You appear to be using a USB3 Coral instead of a PCIE one. The lxc.conf file changes only allow for the pass through of a pcie based Coral, not the usb version.

Maybe take a look at this https://forum.proxmox.com/threads/lxc-container-and-google-coral-passthrough.113501/

I haven’t looked into the USB version of the Coral since I only have PCIE versions.