Error when trying to run depthai-python API in a Docker container
Yes, as I already mention in the first sentence of this post: "I am able to successfully run depthai-python API examples natively on macOS and I have been developing this way for a while."
Yes, I can ping the device from inside my container. Both the device and my laptop (which is running Docker Desktop for macOS) are connected to the same router which gives them a DHCP address. Somthing like:
Device: 192.168.1.22
Laptop: 192.168.1.36
- Edited
I'm also have a similar issue.
I'm running docker desktop on Mac m2
OAK 1 D POE
This is the error:
[2023-10-05 18:48:42.156] [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'"
this is from my docker-compose:
devices:
- /dev/bus/usb:/dev/bus/usb
command: ["--device-cgroup-rule=c 189:* rmw"]
if I test the camera directly on the host it runs. But in docker I can't access.
I tried on Ubuntu VM in Parallels and it worked!
and as suggested I use in my Docker-Compose
"…
devices:
- /dev/bus/usb:/dev/bus/usb
…"