Closed nicoya closed 1 year ago
Remove the usb from your config so it only tries to load the PCIe coral.
Still fails with the USB one commented out
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.3.1
** excluding: set()
['podman', 'ps', '--filter', 'label=io.podman.compose.project=frigate', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
['podman', 'network', 'exists', 'frigate_default']
podman create --name=frigate --label io.podman.compose.config-hash=7e2dc468c05caee9d88cb0f283c2124d603055030ce04d924094b244df53acc2 --label io.podman.compose.project=frigate --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@frigate.service --label com.docker.compose.project=frigate --label com.docker.compose.project.working_dir=/home/nicoya/frigate --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=frigate --device /dev/bus/usb:/dev/bus/usb --device /dev/apex_0:/dev/apex_0 --device /dev/dri/renderD128 -e FRIGATE_RTSP_PASSWORD=***** -v /etc/localtime:/etc/localtime:ro -v /home/nicoya/frigate/config.yml:/config/config.yml -v /home/nicoya/frigate/media:/media/frigate --tmpfs /tmp/cache:size=1000000000 --net frigate_default --network-alias frigate -p 5000:5000 -p 8554:8554 -p 8555:8555/tcp -p 8555:8555/udp --shm-size 1024mb --privileged --restart unless-stopped ghcr.io/blakeblackshear/frigate:stable
d0bebfaa9f6b1c3ae0f1fa393c5fe4545ed1be6495249a9b3a6c44d60fb79bcb
exit code: 0
podman start -a frigate
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[frigate] | 2023-08-10 20:25:47.473933582 [INFO] Preparing go2rtc config...
[frigate] | 2023-08-10 20:25:47.478759203 [INFO] Starting Frigate...
[frigate] | 2023-08-10 20:25:47.480688165 [INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
[frigate] | 2023-08-10 20:25:47.779412588 [INFO] Starting go2rtc...
[frigate] | 2023-08-10 20:25:47.875197790 20:25:47.875 INF go2rtc version 1.2.0 linux/amd64
[frigate] | 2023-08-10 20:25:47.875421226 20:25:47.875 INF [api] listen addr=:1984
[frigate] | 2023-08-10 20:25:47.875922978 20:25:47.875 INF [rtsp] listen addr=:8554
[frigate] | 2023-08-10 20:25:47.876274435 20:25:47.876 INF [srtp] listen addr=:8443
[frigate] | 2023-08-10 20:25:47.876431912 20:25:47.876 INF [webrtc] listen addr=:8555
[frigate] | 2023-08-10 20:25:48.690775326 [2023-08-10 20:25:48] frigate.app INFO : Starting Frigate (0.12.1-367d724)
[frigate] | 2023-08-10 20:25:48.715404084 [2023-08-10 20:25:48] peewee_migrate INFO : Starting migrations
[frigate] | 2023-08-10 20:25:48.720617238 [2023-08-10 20:25:48] peewee_migrate INFO : There is nothing to migrate
[frigate] | 2023-08-10 20:25:48.731956478 [2023-08-10 20:25:48] detector.coral_pci INFO : Starting detection process: 429
[frigate] | 2023-08-10 20:25:48.733759624 [2023-08-10 20:25:48] frigate.app INFO : Output process started: 431
[frigate] | 2023-08-10 20:25:48.738174807 [2023-08-10 20:25:48] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci
[frigate] | 2023-08-10 20:25:48.738343810 Process detector:coral_pci:
[frigate] | 2023-08-10 20:25:48.738787808 [2023-08-10 20:25:48] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
[frigate] | 2023-08-10 20:25:48.739344141 [2023-08-10 20:25:48] frigate.app INFO : Camera processor started for chromedome: 437
[frigate] | 2023-08-10 20:25:48.739965477 Traceback (most recent call last):
[frigate] | 2023-08-10 20:25:48.740000936 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
[frigate] | 2023-08-10 20:25:48.740002945 delegate = Delegate(library, options)
[frigate] | 2023-08-10 20:25:48.740005147 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
[frigate] | 2023-08-10 20:25:48.740008817 raise ValueError(capture.message)
[frigate] | 2023-08-10 20:25:48.740017331 ValueError
[frigate] | 2023-08-10 20:25:48.740031240
[frigate] | 2023-08-10 20:25:48.740047891 During handling of the above exception, another exception occurred:
[frigate] | 2023-08-10 20:25:48.740049315
[frigate] | 2023-08-10 20:25:48.740050819 Traceback (most recent call last):
[frigate] | 2023-08-10 20:25:48.740060183 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
[frigate] | 2023-08-10 20:25:48.740061556 self.run()
[frigate] | 2023-08-10 20:25:48.740063385 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
[frigate] | 2023-08-10 20:25:48.740065096 self._target(*self._args, **self._kwargs)
[frigate] | 2023-08-10 20:25:48.740177324 File "/opt/frigate/frigate/object_detection.py", line 98, in run_detector
[frigate] | 2023-08-10 20:25:48.740179533 object_detector = LocalObjectDetector(detector_config=detector_config)
[frigate] | 2023-08-10 20:25:48.740191051 File "/opt/frigate/frigate/object_detection.py", line 52, in __init__
[frigate] | 2023-08-10 20:25:48.740192844 self.detect_api = create_detector(detector_config)
[frigate] | 2023-08-10 20:25:48.740194673 File "/opt/frigate/frigate/detectors/__init__.py", line 24, in create_detector
[frigate] | 2023-08-10 20:25:48.740196190 return api(detector_config)
[frigate] | 2023-08-10 20:25:48.740197992 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 37, in __init__
[frigate] | 2023-08-10 20:25:48.740199621 edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
[frigate] | 2023-08-10 20:25:48.740201469 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
[frigate] | 2023-08-10 20:25:48.740220719 raise ValueError('Failed to load delegate from {}\n{}'.format(
[frigate] | 2023-08-10 20:25:48.740222645 ValueError: Failed to load delegate from libedgetpu.so.1.0
[frigate] | 2023-08-10 20:25:48.740223906
[frigate] | 2023-08-10 20:25:48.743905158 [2023-08-10 20:25:48] frigate.app INFO : Camera processor started for boolit: 439
[frigate] | 2023-08-10 20:25:48.749138181 [2023-08-10 20:25:48] frigate.app INFO : Capture process started for chromedome: 441
[frigate] | 2023-08-10 20:25:48.754445749 [2023-08-10 20:25:48] frigate.app INFO : Capture process started for boolit: 444
[frigate] | 2023-08-10 20:25:57.478922910 [INFO] Starting go2rtc healthcheck service...
[frigate] | 2023-08-10 20:26:08.987404170 [2023-08-10 20:26:08] 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 nginx: stopping
s6-rc: info: service go2rtc-healthcheck: stopping
[frigate] | 2023-08-10 20:26:09.053350563 [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
[frigate] | 2023-08-10 20:26:09.169478391 [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
[frigate] | 2023-08-10 20:26:09.186822380 [2023-08-10 20:26:09] frigate.app INFO : Stopping...
[frigate] | 2023-08-10 20:26:09.195136552 [2023-08-10 20:26:09] frigate.stats INFO : Exiting stats emitter...
[frigate] | 2023-08-10 20:26:09.195145795 [2023-08-10 20:26:09] frigate.record INFO : Exiting recording maintenance...
[frigate] | 2023-08-10 20:26:09.195152021 [2023-08-10 20:26:09] frigate.record INFO : Exiting recording cleanup...
[frigate] | 2023-08-10 20:26:09.195155767 [2023-08-10 20:26:09] frigate.storage INFO : Exiting storage maintainer...
[frigate] | 2023-08-10 20:26:09.195159859 [2023-08-10 20:26:09] frigate.watchdog INFO : Exiting watchdog...
[frigate] | 2023-08-10 20:26:09.195164650 [2023-08-10 20:26:09] frigate.events INFO : Exiting event cleanup...
[frigate] | 2023-08-10 20:26:09.196717322 [2023-08-10 20:26:09] frigate.object_processing INFO : Exiting object processor...
s6-rc: info: service nginx-log successfully stopped
[frigate] | 2023-08-10 20:26:09.746211008 [2023-08-10 20:26:09] frigate.comms.ws INFO : Exiting websocket client...
[frigate] | 2023-08-10 20:26:10.004311572 [2023-08-10 20:26:10] frigate.events INFO : Exiting event processor...
[frigate] | 2023-08-10 20:26:10.006634565 [2023-08-10 20:26:10] peewee.sqliteq INFO : writer received shutdown request, exiting.
[frigate] | 2023-08-10 20:26:10.012351457 [2023-08-10 20:26:10] watchdog.chromedome INFO : Terminating the existing ffmpeg process...
[frigate] | 2023-08-10 20:26:10.012916694 [2023-08-10 20:26:10] watchdog.boolit INFO : Terminating the existing ffmpeg process...
[frigate] | 2023-08-10 20:26:10.013327761 [2023-08-10 20:26:10] watchdog.chromedome INFO : Waiting for ffmpeg to exit gracefully...
[frigate] | 2023-08-10 20:26:10.013699541 [2023-08-10 20:26:10] watchdog.boolit INFO : Waiting for ffmpeg to exit gracefully...
[frigate] | 2023-08-10 20:26:10.048181921 [2023-08-10 20:26:10] watchdog.chromedome INFO : Terminating the existing ffmpeg process...
[frigate] | 2023-08-10 20:26:10.048586539 [2023-08-10 20:26:10] watchdog.chromedome INFO : Waiting for ffmpeg to exit gracefully...
[frigate] | 2023-08-10 20:26:10.101296294 [2023-08-10 20:26:10] watchdog.boolit INFO : Terminating the existing ffmpeg process...
[frigate] | 2023-08-10 20:26:10.101475918 [2023-08-10 20:26:10] watchdog.boolit INFO : Waiting for ffmpeg to exit gracefully...
[frigate] | 2023-08-10 20:26:10.286880888 [2023-08-10 20:26:10] frigate.output INFO : exiting output process...
[frigate] | 2023-08-10 20:26:14.332473636 /usr/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 11 leaked shared_memory objects to clean up at shutdown
[frigate] | 2023-08-10 20:26:14.332477488 warnings.warn('resource_tracker: There appear to be %d '
[frigate] | 2023-08-10 20:26:14.336999704 [INFO] Service Frigate exited with code 0 (by signal 0)
s6-rc: info: service frigate successfully stopped
s6-rc: info: service go2rtc: stopping
s6-rc: info: service frigate-log: stopping
[frigate] | 2023-08-10 20:26:14.340586864 exit OK
s6-rc: info: service frigate-log successfully stopped
[frigate] | 2023-08-10 20:26:14.346562161 [INFO] The go2rtc service exited with code 0 (by signal 0)
s6-rc: info: service go2rtc successfully stopped
s6-rc: info: service go2rtc-log: stopping
s6-rc: info: service go2rtc-log successfully stopped
s6-rc: info: service log-prepare: stopping
s6-rc: info: service s6rc-fdholder: stopping
s6-rc: info: service log-prepare successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service s6rc-fdholder successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
exit code: 0
Could try mapping the device as a volume instead, I've never seen this type of issue before.
Hmm, further experimentation revealed that this is a peculiar podman issue. Despite using the privileged
flag, the device node was not accessible from within the container. Adding group-add: keep-groups
to the compose file got the PCI device working. The USB device is still stuck in "Global Unichip" mode but that's probably its own, additional issue that I don't feel like looking into right now.
Thanks for the update, that is odd. Feel free to create a new issue if something else comes up.
Oops, I misspoke. group-add: keep-groups
wasn't what fixed it, making the device node o+rw did. I'll open a podman bug for this because this clearly doesn't seem right.
Ok, finally finally figured it out. It's supposed to be:
group_add:
- keep-groups
Annoyingly, podman-compose isn't very verbal about skipping over directives it doesn't understand.
Describe the problem you are having
First up, the Coral USB seems to be forever stuck in "Global Unichip Corp." mode. I managed to once get it into "Google Inc." mode after some hours of random debugging but that didn't seem to improve things; it still didn't work in Frigate. I don't expect this is a power issue since the Coral is plugged directly into a USB 3.2 port on my desktop-class system.
I then managed to source an M.2 Coral and installed that. But, again, no dice, Frigate won't talk to it.
I found some diagnostics in another bug thread, and no luck there:
I can't diagnose anything from the host OS because pycoral hasn't been updated for Python 3.11.
I'm not sure what else to try?
Version
0.12.1-367D724
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
Operating system
Debian
Install method
Docker Compose
Coral version
Other
Any other information that may be helpful
$ lsusb Bus 006 Device 002: ID 1a6e:089a Global Unichip Corp. Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0b38:0010 Gear Head 107-Key Keyboard Bus 001 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05) 00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 05) 00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31) 00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31) 00:17.0 SATA controller: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] (rev 31) 00:1b.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #17 (rev f1) 00:1b.3 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #20 (rev f1) 00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 (rev f1) 00:1c.7 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #8 (rev f1) 00:1d.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 (rev f1) 00:1f.0 ISA bridge: Intel Corporation Z170 Chipset LPC/eSPI Controller (rev 31) 00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31) 00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) 00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31) 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31) 01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2070] (rev a1) 01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1) 01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1) 01:00.3 Serial bus controller: NVIDIA Corporation TU106 USB Type-C UCSI Controller (rev a1) 03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) 04:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04) 06:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU