I am able to successfully run depthai-python API examples natively on macOS and I have been developing this way for a while. However, now I need to run in a Docker container.
I'm trying to follow the instructions from here.
I have the following software:
- macOS Monterey 12.6.8
- Docker Desktop for macOS Version 3.6.0 (3.6.0.5487)
- XQuartz 2.7.11 (xorg-server 1.18.4)
I am able to successfully pull the docker image:
docker pull luxonis/depthai-library
But when I run:
docker run --rm \
--privileged \
-v /dev/bus/usb:/dev/bus/usb \
--device-cgroup-rule='c 189:* rmw' \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
luxonis/depthai-library:latest \
python3 /depthai-python/examples/ColorCamera/rgb_preview.py
I get this error:
[2023-09-05 20:14:48.879] [depthai] [warning] USB protocol not available - If running in a container, make sure that the following is set: "-v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw'"
Traceback (most recent call last):
File "/depthai-python/examples/ColorCamera/rgb_preview.py", line 24, in <module>
with dai.Device(pipeline) as device:
RuntimeError: No available devices
Thoughts?