Hi all, I’m sure I’m doing something stupid but I can’t figure out what. Anyone have an idea why it doesn’t see my coral when I run with docker compose but it does see it when I run on the command line?
Here’s the log:
* Starting nginx nginx
...done.
Starting migrations
peewee_migrate INFO : Starting migrations
There is nothing to migrate
peewee_migrate INFO : There is nothing to migrate
frigate.mqtt INFO : MQTT connected
frigate.app INFO : Camera processor started for right: 37
frigate.app INFO : Camera processor started for left: 39
frigate.app INFO : Camera processor started for front: 40
frigate.app INFO : Camera processor started for back: 41
frigate.app INFO : Capture process started for right: 42
frigate.app INFO : Capture process started for left: 43
frigate.app INFO : Capture process started for front: 44
frigate.app INFO : Capture process started for back: 45
detector.coral INFO : Starting detection process: 35
frigate.edgetpu INFO : Attempting to load TPU as usb
Process detector:coral:
frigate.edgetpu INFO : No EdgeTPU detected.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
delegate = Delegate(library, options)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, 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 124, in run_detector
object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate...
frigate.app INFO : Stopping...
frigate.events INFO : Exiting event cleanup...
frigate.object_processing INFO : Exiting object processor...
frigate.record INFO : Exiting recording maintenance...
frigate.events INFO : Exiting event processor...
frigate.watchdog INFO : Exiting watchdog...
frigate.stats INFO : Exiting watchdog...
peewee.sqliteq INFO : writer received shutdown request, exiting.
root INFO : Waiting for detection process to exit gracefully...
frigate.video INFO : left: exiting subprocess
* Starting nginx nginx
...done.
Starting migrations
peewee_migrate INFO : Starting migrations
There is nothing to migrate
peewee_migrate INFO : There is nothing to migrate
frigate.mqtt INFO : MQTT connected
frigate.app INFO : Camera processor started for right: 35
frigate.app INFO : Camera processor started for left: 36
frigate.app INFO : Camera processor started for front: 37
frigate.app INFO : Camera processor started for back: 38
frigate.app INFO : Capture process started for right: 40
frigate.app INFO : Capture process started for left: 41
frigate.app INFO : Capture process started for front: 42
frigate.app INFO : Capture process started for back: 44
detector.coral INFO : Starting detection process: 33
Process detector:coral:
Traceback (most recent call last):
frigate.edgetpu INFO : Attempting to load TPU as usb
frigate.edgetpu INFO : No EdgeTPU detected.
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
delegate = Delegate(library, options)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, 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 124, in run_detector
object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate...
frigate.app INFO : Stopping...
frigate.object_processing INFO : Exiting object processor...
frigate.record INFO : Exiting recording maintenance...
frigate.events INFO : Exiting event processor...
frigate.events INFO : Exiting event cleanup...
frigate.watchdog INFO : Exiting watchdog...
frigate.stats INFO : Exiting watchdog...
peewee.sqliteq INFO : writer received shutdown request, exiting.
root INFO : Waiting for detection process to exit gracefully...
watchdog.left INFO : Terminating the existing ffmpeg process...
* Starting nginx nginx
...done.
Starting migrations
peewee_migrate INFO : Starting migrations
There is nothing to migrate
peewee_migrate INFO : There is nothing to migrate
frigate.mqtt INFO : MQTT connected
frigate.app INFO : Camera processor started for right: 36
frigate.app INFO : Camera processor started for left: 38
frigate.app INFO : Camera processor started for front: 40
frigate.app INFO : Camera processor started for back: 41
frigate.app INFO : Capture process started for right: 42
frigate.app INFO : Capture process started for left: 44
frigate.app INFO : Capture process started for front: 48
frigate.app INFO : Capture process started for back: 50
detector.coral INFO : Starting detection process: 34
Process detector:coral:
frigate.edgetpu INFO : Attempting to load TPU as usb
frigate.edgetpu INFO : No EdgeTPU detected.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
delegate = Delegate(library, options)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, 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 124, in run_detector
object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate...
frigate.app INFO : Stopping...
frigate.record INFO : Exiting recording maintenance...
frigate.object_processing INFO : Exiting object processor...
frigate.events INFO : Exiting event processor...
frigate.events INFO : Exiting event cleanup...
frigate.watchdog INFO : Exiting watchdog...
frigate.stats INFO : Exiting watchdog...
peewee.sqliteq INFO : writer received shutdown request, exiting.
root INFO : Waiting for detection process to exit gracefully...
frigate.video INFO : back: exiting subprocess
Fatal Python error: Bus error
Thread 0x00007faddde62700 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 302 in wait
File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
File "/usr/lib/python3.Fatal Python error: 8Bus error
Thread 0x00007faddde62700 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 302 in wait
File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
File "/usr/lib/python3.8/threading.py", line 870 in run
File "/usr/lib/python3.8/threading/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Current thread 0x00007fadde663700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 117 in capture_frames
File "/opt/frigate/frigate/video.py", line 231 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007faddee64700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 205 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadcc994700 (most recent call first):
File "/opt/frigate/friga.py", line 870 in run
File "/usr/tle/log.py", line 71 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadeb057740 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
File "/usr/lib/python3.8/threading.py", line 1011 in join
File "/opt/frigate/frigate/video.py", line 245 in capture_camera
File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run
File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__
File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen
File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen
File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start
File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes
File "/opt/frigate/frigate/app.py", line 228 in start
File "/opt/frigate/frigate/__main__.py", line 15 in <module>
File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
ib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Current thread 0x00007fadde663700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 117 in capture_frames
File "/opt/frigate/frigate/video.py", line 231 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007faddee64700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 205 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadcc994700 (most recent call first):
File "/opt/frigate/frigate/log.py", line 71 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadeb057740 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
File "/usr/lib/python3.8/threading.py", line 1011 in join
File "/opt/frigate/frigate/video.py", line 245 in capture_camera
File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run
File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__
File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen
File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen
File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start
File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes
File "/opt/frigate/frigate/app.py", line 228 in start
File "/opt/frigate/frigate/__main__.py", line 15 in <module>
File "Fatal Python error: Bus error
Thread 0x00007faddde62700 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 302 in wait
File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
File "/usr/lib/python3.8/threading.py", line 870 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Current thread 0x00007fadde663700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 117 in capture_frames
File "/opt/frigate/frigate/video.py", line 231 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007faddee64700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 205 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadcc994700 (most recent call first):
File "/opt/frigate/frigate/log.py", line 71 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadeb057740 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
File "/usr/lib/python3.8/threading.py", line 1011 in join
File "/opt/frigate/frigate/video.py", line 245 in capture_camera
File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run
File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__
File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen
File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen
File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start
File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes
File "/opt/frigate/frigate/app.py", line 228 in start
File "/opt/frigate/frigate/__main__.py", line 15 in <module>
File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
/usr/lib/python3.8/runpy.py", line 87 in _run_code
File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
Fatal Python error: Bus error
Thread 0x00007faddde62700 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 302 in wait
File "/usr/lib/python3.8/multiprocessing/queues.py", line 227 in _feed
File "/usr/lib/python3.8/threading.py", line 870 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Current thread 0x00007fadde663700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 117 in capture_frames
File "/opt/frigate/frigate/video.py", line 231 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007faddee64700 (most recent call first):
File "/opt/frigate/frigate/video.py", line 205 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadcc994700 (most recent call first):
File "/opt/frigate/frigate/log.py", line 71 in run
File "/usr/lib/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fadeb057740 (most recent call first):
File "/usr/lib/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
File "/usr/lib/python3.8/threading.py", line 1011 in join
File "/opt/frigate/frigate/video.py", line 245 in capture_camera
File "/usr/lib/python3.8/multiprocessing/process.py", line 108 in run
File "/usr/lib/python3.8/multiprocessing/process.py", line 315 in _bootstrap
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75 in _launch
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19 in __init__
File "/usr/lib/python3.8/multiprocessing/context.py", line 277 in _Popen
File "/usr/lib/python3.8/multiprocessing/context.py", line 224 in _Popen
File "/usr/lib/python3.8/multiprocessing/process.py", line 121 in start
File "/opt/frigate/frigate/app.py", line 182 in start_camera_capture_processes
File "/opt/frigate/frigate/app.py", line 228 in start
File "/opt/frigate/frigate/__main__.py", line 15 in <module>
File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
* Starting nginx nginx
...done.
Starting migrations
peewee_migrate INFO : Starting migrations
There is nothing to migrate
peewee_migrate INFO : There is nothing to migrate
frigate.mqtt INFO : MQTT connected
frigate.app INFO : Camera processor started for right: 35
frigate.app INFO : Camera processor started for left: 37
frigate.app INFO : Camera processor started for front: 38
frigate.app INFO : Camera processor started for back: 40
frigate.app INFO : Capture process started for right: 41
frigate.app INFO : Capture process started for left: 43
frigate.app INFO : Capture process started for front: 44
frigate.app INFO : Capture process started for back: 45
detector.coral INFO : Starting detection process: 33
Process detector:coral:
frigate.edgetpu INFO : Attempting to load TPU as usb
frigate.edgetpu INFO : No EdgeTPU detected.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 152, in load_delegate
delegate = Delegate(library, options)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 111, 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 124, in run_detector
object_detector = LocalObjectDetector(tf_device=tf_device, num_threads=num_threads)
File "/opt/frigate/frigate/edgetpu.py", line 63, in __init__
edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', device_config)
File "/usr/local/lib/python3.8/dist-packages/tflite_runtime/interpreter.py", line 154, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate...
frigate.app INFO : Stopping...
frigate.object_processing INFO : Exiting object processor...
frigate.record INFO : Exiting recording maintenance...
frigate.events INFO : Exiting event processor...
frigate.events INFO : Exiting event cleanup...
frigate.watchdog INFO : Exiting watchdog...
frigate.stats INFO : Exiting watchdog...
peewee.sqliteq INFO : writer received shutdown request, exiting.
root INFO : Waiting for detection process to exit gracefully...
frigate.video INFO : back: exiting subprocess
Fatal Python error: Bus error
here’s my docker compose which gives me the above log
version: '3.9'
services:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: blakeblackshear/frigate:0.8.3-amd64
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128
volumes:
- /etc/localtime:/etc/localtime:ro
- ${ROOT}/config:/config:ro
- ${ROOT}/storage:/storage
- ${VIDEO}/clips:/media/frigate/clips
- ${VIDEO}/recordings:/media/frigate/recordings
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- '4000:5000'
- '1935:1935'
environment:
- FRIGATE_MQTT_PASSWORD=${MQTT_PASSWORD}
- FRIGATE_RTSP_PASSWORD=${RTSP_PASSWORD}
- FRIGATE_RTSP_PASSWORD_RIGHT=${FRIGATE_RTSP_PASSWORD_RIGHT}
- FRIGATE_RTSP_PASSWORD_LEFT=${FRIGATE_RTSP_PASSWORD_LEFT}
- FRIGATE_RTSP_PASSWORD_FRONT=${FRIGATE_RTSP_PASSWORD_FRONT}
- FRIGATE_RTSP_PASSWORD_BACK=${FRIGATE_RTSP_PASSWORD_BACK}
whereas the following command works fine:
docker run --rm --name frigate_command --privileged --shm-size=1g --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 -v /dev/bus/usb:/dev/bus/usb -v /volume1/docker/frigate/config:/config:ro -v /etc/localtime:/etc/localtime:ro -v /volume1/docker/frigate/storage:/storage -v /volume1/video/frigate/clips:/media/frigate/clips -v /volume1/video/frigate/recordings:/media/frigate/recordings -p 4000:5000 -p 1935:1935 -e FRIGATE_MQTT_PASSWORD='PW' -e FRIGATE_RTSP_PASSWORD='PW' -e FRIGATE_RTSP_PASSWORD_RIGHT='PW' -e FRIGATE_RTSP_PASSWORD_LEFT='PW' -e FRIGATE_RTSP_PASSWORD_FRONT='PW' -e FRIGATE_RTSP_PASSWORD_BACK='PW'blakeblackshear/frigate:0.8.3-amd64 &