I have a multicontainer app that is finally able to detect a Google coral connected through USB. The issue is that the first time it checks for the device it throws an error (I’d include, but suffice to say it doesn’t see the device connected on USB).
After the service restarts, it’s able to see and use the device correctly. Does anyone know the necessary cap_add permission to allow my container to see the connected USB device right away? Here are the relevant section of my docker-compose.yaml:
Sorry for the super delayed response here. Is this resolved for you yet. Also, did you already try cap_add with ALL option to see if that makes a difference.
You can enable persistent logging to compare logs 1:1 before and after restart to see if what changes. Ref: Configuration - Balena Documentation
Feel free to share logs of the device, we can help debug the same.
I am definitively also experiencing problems with USB detection on a balena service container.
If I go to network_mode: host with my service, then everything works. However, I would like to run my service as an independent multicontainer (i.e. in bridge mode). And that’s when the problems start.
I am using the library usb-detection. I don’t think it is the libraries’s fault. I think there is still something wrong with udev inside the balena docker service.
I am running all this on a amd64 standard balena lib on an intel-based PC.
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:16-run