Hi everyone,
I don’t acheive to make my Google Coral USB work for my frigate installation. I’m not sure to be in the good topics so if i’m wrong don’t hesite to tell me
This is my installation for now:
- Hardware : Intel NUC
- Software :
- Proxmox installed on it
- VM for Home Assistant
- LXC for frigate and Portainer on it to launch frigate container.
I follow this tuto : https://www.saninnsalas.com/passing-google-coral-usb-edge-tpu-to-an-unprivileged-container-in-proxmox/
Then I modified my docker image like this :
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "256mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
#- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/frigate/config.yml:/config/config.yml
- /opt/frigate/storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
#environment:
# FRIGATE_RTSP_PASSWORD: "password"
And finally I modified my Frigate configuration file with this :
detectors:
coral:
type: edgetpu
device: usb
With this configurations I have my frigate container which is loop in “start, error and stop” with this mesage :
2025-03-05 20:37:44.027441407 [INFO] Starting Frigate...
s6-rc: info: service legacy-services successfully started
2025-03-05 20:37:44.369198788 127.0.0.1 - - [05/Mar/2025:20:37:44 +0000] "" 400 0 "-" "-" "-"
2025-03-05 20:37:45.017727749 [INFO] Starting go2rtc...
2025-03-05 20:37:45.215838615 20:37:45.215 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2025-03-05 20:37:45.215979933 20:37:45.215 INF config path=/dev/shm/go2rtc.yaml
2025-03-05 20:37:45.217027939 20:37:45.216 INF [api] listen addr=:1984
2025-03-05 20:37:45.217256851 20:37:45.216 INF [rtsp] listen addr=:8554
2025-03-05 20:37:45.217971946 20:37:45.217 INF [webrtc] listen addr=:8555/tcp
2025-03-05 20:37:47.785243960 2025/03/05 20:37:47 [error] 161#161: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.30, server: , request: "GET /api/stats HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "192.168.1.38:5000"
2025-03-05 20:37:47.785253309 2025/03/05 20:37:47 [error] 161#161: *2 auth request unexpected status: 502 while sending to client, client: 192.168.1.30, server: , request: "GET /api/stats HTTP/1.1", host: "192.168.1.38:5000"
2025-03-05 20:37:51.655464961 [2025-03-05 20:37:51] frigate.util.config INFO : Checking if frigate config needs migration...
2025-03-05 20:37:51.740439903 [2025-03-05 20:37:51] frigate.util.config INFO : frigate config does not need migration...
2025-03-05 20:37:51.964260485 [2025-03-05 20:37:51] frigate.util.services WARNING : Did not detect hwaccel, using a GPU for accelerated video decoding is highly recommended
2025-03-05 20:37:52.007060881 [2025-03-05 20:37:52] frigate.app INFO : Starting Frigate (0.15.0-cea210d)
2025-03-05 20:37:52.057966151 [2025-03-05 20:37:52] peewee_migrate.logs INFO : Starting migrations
2025-03-05 20:37:52.059112344 [2025-03-05 20:37:52] peewee_migrate.logs INFO : There is nothing to migrate
2025-03-05 20:37:52.090541425 [2025-03-05 20:37:52] frigate.app INFO : Recording process started: 351
2025-03-05 20:37:52.090735429 [2025-03-05 20:37:52] frigate.app INFO : Review process started: 358
2025-03-05 20:37:52.101662809 [2025-03-05 20:37:52] frigate.app INFO : go2rtc process pid: 98
2025-03-05 20:37:52.138260661 [2025-03-05 20:37:52] detector.coral INFO : Starting detection process: 367
2025-03-05 20:37:52.786714602 2025/03/05 20:37:52 [error] 162#162: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.30, server: , request: "GET /api/stats HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:5001/auth", host: "192.168.1.38:5000"
2025-03-05 20:37:52.786722889 2025/03/05 20:37:52 [error] 162#162: *4 auth request unexpected status: 502 while sending to client, client: 192.168.1.30, server: , request: "GET /api/stats HTTP/1.1", host: "192.168.1.38:5000"
2025-03-05 20:37:53.697778619 [INFO] Starting go2rtc healthcheck service...
2025-03-05 20:38:17.464473940 [2025-03-05 20:37:52] frigate.app INFO : Output process started: 386
2025-03-05 20:38:17.464517648 [2025-03-05 20:37:52] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2025-03-05 20:38:17.464822647 [2025-03-05 20:37:52] frigate.app INFO : Camera processor started for camera_devant: 400
2025-03-05 20:38:17.466896002 [2025-03-05 20:37:52] frigate.app INFO : Camera processor started for camera_arriere: 403
2025-03-05 20:38:17.466904875 [2025-03-05 20:38:17] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
2025-03-05 20:38:17.466912076 [2025-03-05 20:37:52] frigate.app INFO : Camera processor started for camera_cabanon: 405
2025-03-05 20:38:17.466915884 [2025-03-05 20:37:52] frigate.app INFO : Capture process started for camera_devant: 416
2025-03-05 20:38:17.466984055 [2025-03-05 20:37:52] frigate.app INFO : Capture process started for camera_arriere: 438
2025-03-05 20:38:17.466987669 [2025-03-05 20:37:52] frigate.app INFO : Capture process started for camera_cabanon: 446
2025-03-05 20:38:17.467052653 [2025-03-05 20:37:55] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-03-05 20:38:17.467202352 [2025-03-05 20:37:56] frigate.api.fastapi_app INFO : FastAPI started
2025-03-05 20:38:17.474674792 Process detector:coral:
2025-03-05 20:38:17.474682128 Traceback (most recent call last):
2025-03-05 20:38:17.474684579 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
2025-03-05 20:38:17.474686268 delegate = Delegate(library, options)
2025-03-05 20:38:17.474688385 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
2025-03-05 20:38:17.474690086 raise ValueError(capture.message)
2025-03-05 20:38:17.474691490 ValueError
2025-03-05 20:38:17.474692830
2025-03-05 20:38:17.474694667 During handling of the above exception, another exception occurred:
2025-03-05 20:38:17.474695946
2025-03-05 20:38:17.474697499 Traceback (most recent call last):
2025-03-05 20:38:17.474699448 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2025-03-05 20:38:17.474700922 self.run()
2025-03-05 20:38:17.474702860 File "/opt/frigate/frigate/util/process.py", line 41, in run_wrapper
2025-03-05 20:38:17.474706108 return run(*args, **kwargs)
2025-03-05 20:38:17.474708062 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2025-03-05 20:38:17.474796392 self._target(*self._args, **self._kwargs)
2025-03-05 20:38:17.474799900 File "/opt/frigate/frigate/object_detection.py", line 121, in run_detector
2025-03-05 20:38:17.474802391 object_detector = LocalObjectDetector(detector_config=detector_config)
2025-03-05 20:38:17.474804290 File "/opt/frigate/frigate/object_detection.py", line 68, in __init__
2025-03-05 20:38:17.474806224 self.detect_api = create_detector(detector_config)
2025-03-05 20:38:17.474808207 File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2025-03-05 20:38:17.474809767 return api(detector_config)
2025-03-05 20:38:17.474848142 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 41, in __init__
2025-03-05 20:38:17.474851351 edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
2025-03-05 20:38:17.474853559 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
2025-03-05 20:38:17.474855735 raise ValueError('Failed to load delegate from {}\n{}'.format(
2025-03-05 20:38:17.474857550 ValueError: Failed to load delegate from libedgetpu.so.1.0
2025-03-05 20:38:17.474858827
2025-03-05 20:38:25.593038531 [2025-03-05 20:38:25] frigate.watchdog INFO : Detection appears to have stopped. Exiting Frigate...
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service go2rtc-healthcheck: stopping
s6-rc: info: service certsync: stopping
2025-03-05 20:38:25.620126390 [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
2025-03-05 20:38:25.627817624 [INFO] Service CERTSYNC exited with code 256 (by signal 15)
s6-rc: info: service certsync successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service certsync-log: stopping
s6-rc: info: service certsync-log successfully stopped
2025-03-05 20:38:25.713108374 [INFO] Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
s6-rc: info: service nginx-log successfully stopped
2025-03-05 20:38:25.872211909 [2025-03-05 20:38:25] frigate.app INFO : Stopping...
2025-03-05 20:38:25.878208557 [2025-03-05 20:38:25] frigate.watchdog INFO : Exiting watchdog...
2025-03-05 20:38:25.878216957 [2025-03-05 20:38:25] frigate.record.cleanup INFO : Exiting recording cleanup...
2025-03-05 20:38:25.878219432 [2025-03-05 20:38:25] frigate.events.cleanup INFO : Exiting event cleanup...
2025-03-05 20:38:25.878221590 [2025-03-05 20:38:25] frigate.stats.emitter INFO : Exiting stats emitter...
2025-03-05 20:38:25.878223706 [2025-03-05 20:38:25] frigate.ptz.autotrack INFO : Exiting autotracker...
2025-03-05 20:38:25.878225905 [2025-03-05 20:38:25] frigate.storage INFO : Exiting storage maintainer...
2025-03-05 20:38:25.880896723 [2025-03-05 20:38:25] frigate.app INFO : Waiting for capture process for camera_devant to stop
2025-03-05 20:38:25.886466535 [2025-03-05 20:38:25] watchdog.camera_devant INFO : Terminating the existing ffmpeg process...
2025-03-05 20:38:25.887475404 [2025-03-05 20:38:25] watchdog.camera_devant INFO : Waiting for ffmpeg to exit gracefully...
2025-03-05 20:38:26.220530750 [2025-03-05 20:38:26] frigate.app INFO : Waiting for capture process for camera_arriere to stop
2025-03-05 20:38:26.222227529 [2025-03-05 20:38:26] watchdog.camera_arriere INFO : Terminating the existing ffmpeg process...
2025-03-05 20:38:26.222715584 [2025-03-05 20:38:26] watchdog.camera_arriere INFO : Waiting for ffmpeg to exit gracefully...
2025-03-05 20:38:26.496347873 [2025-03-05 20:38:26] frigate.object_processing INFO : Exiting object processor...
2025-03-05 20:38:26.574152809 [2025-03-05 20:38:26] frigate.events.maintainer INFO : Exiting event processor...
2025-03-05 20:38:26.776484635 [2025-03-05 20:38:26] frigate.app INFO : Waiting for capture process for camera_cabanon to stop
2025-03-05 20:38:26.779782942 [2025-03-05 20:38:26] watchdog.camera_cabanon INFO : Terminating the existing ffmpeg process...
2025-03-05 20:38:26.780360857 [2025-03-05 20:38:26] watchdog.camera_cabanon INFO : Waiting for ffmpeg to exit gracefully...
2025-03-05 20:38:26.976621761 [2025-03-05 20:38:26] frigate.app INFO : Waiting for process for camera_devant to stop
Could you tell me what I’m doing wrong ? Do I miss something on configuration side ?
Thanks you very much for your help.