Hi all,
I’m trying to develop a C++ application with an OAK‑D camera inside a Docker container and I’m running into a couple of problems.
Environment:
Base image: Ubuntu 22.04 (multi‑stage Dockerfile)
Installed packages: build‑essential, cmake, git, ninja‑build, libusb‑1.0‑0(-dev), libopencv-dev, pkg-config, python3-pip, udev, usbutils, etc.
depthai-core
cloned from Luxonis GitHub repository (latest master) and built from source inside the container with VCPKG_FORCE_SYSTEM_BINARIES=1
.
My app built in the container uses DepthAI C++ SDK.
I added udev rules on the host (and inside the container) for vendor 03e7
and mount /dev/bus/usb
into the container.
Issue - Device not found:
Inside the container, lsusb
shows the device:
$$
Bus 001 Device 044: ID 03e7:2485 Intel Movidius MyriadX
$$
However, when I run my C++ program, I get:
$$
[depthai] [warning] Skipping X_LINK_UNBOOTED device with name "1.5" ()
terminate called after throwing an instance of 'std::runtime_error'
what(): No available devices
$$
or:
$$
RuntimeError: Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND
$$
I tried different USB ports (USB3 vs. USB2) and ensured proper power, but the device still doesn’t boot. The camera works fine when I run Python examples on my host machine directly, so the hardware itself seems OK.
Questions:
Which version of depthai-core
is recommended for building C++ applications in a Docker environment?
Is there an official Docker image or recommended approach to run DepthAI C++ examples in containers?
Has anyone encountered the X_LINK_DEVICE_NOT_FOUND
error when the device is visible via lsusb
in a container? Any suggestions to resolve this?
Any guidance would be greatly appreciated. Thank you!
code can be viewed: Pecako2001/depthai-core-example