Woof, this is a doozy. So, I have created an application which serves DepthAI processed video to an RTSP stream. This code runs on a Jetson Nano, making use of hardware accel to encode and run some CV ops. Problem being, L4T ships with an Ubuntu 18.04 distro... which has old GStreamer library package versions that do not compile when attempting to use any of the RTSP server code for an appsrc. This is not wholly relevant to my post, but I feel the need to explain why I am in this situation and my constraints, in case there is a better solution. In order to avoid having to a) go through an Ubuntu upgrade every time I bring up a new system and b) recompile and build OpenCV from source with CUDA and GStreamer, I was hoping to squash all necessary dependencies into a Docker container running Ubuntu 20.04, and simply run my RTSP server inside there. For the record, the application works flawlessly on a host Jetson. This brings me to my main problem. When I attempt to run my application (it compiles + builds no problem), I receive an error:
Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND
I have tried several solutions inspired by what I have seen work on my host systems and various pieces compiled from the Dockerfiles of others. I am currently running the following command to bring the container up:
docker run --rm --privileged -it -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw' my-image-name:latest
The image is configured with an entrypoint that runs my compile and build steps. When I attempt to run the resulting binary, the above error occurs. I am unable to make any fixes with udev, as, to my knowledge, it does not support containers. I have tee'd the rule in anyways, as it is present in the depthai-docker repo Dockerfile. Looking at the files found in depthai-python/ci, there is a step where libusb is installed from source and a setup script is called to ignore udev - is that required to get this all to work?
Overall, if anyone has any idea where I might be going wrong/how to set up DepthAI over USB to a Docker container that I am building from scratch (mostly), please let me know!