Access to Raspberry Cam v2 fails from docker container using L4T 32.4.2 (using nvarguscamerasrc)

Hello,

I posted this problem a year ago: Access to Raspberry Cam ( nvargus-daemon ) from docker container , back in the days it wasn’t possible to do this without proxying the CSI camera into /dev/video*

I thought nvargus-daemon was now accessible from Docker container since Jetpack 3.3 , but I can’t make it work somehow. I’ve read this documentation here: https://github.com/NVIDIA/nvidia-docker/wiki/NVIDIA-Container-Runtime-on-Jetson#supported-devices but it doesn’t say much about accessing nvargus-daemon .

The error I get is still:

(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: No such file or directory (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 201)
(Argus) Error FileOperationFailed: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 102)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:551 Failed to create CameraProvider
[ WARN:0] global /var/local/git/opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

Is is still not possible ??

The pipeline I’m trying to use is

nvarguscamerasrc ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12 ! nvvidconv ! video/x-raw, format=BGRx, width=640, height=360 ! videoconvert ! video/x-raw, format=BGR ! appsink

I’m running Jetson nano with latest Jetpack 32.4.2 and building my dockerfile FROM nvcr.io/nvidia/l4t-base:r32.4.2

Thanks

Have a reference to below link. I ever have it working on the r32.3.1

Hi,

Thanks for you answer… Yes I’ve read this documentation, maybe I didn’t understand it well or I have something broken on my jetpack version.

Here is a minimal way to reproduce my issue:

Launch a docker container interactively

# Allow containers to communicate with Xorg
sudo xhost +si:localuser:root
sudo docker run --runtime nvidia --network host -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:r32.3.1

Then try to launch the Raspberry pi cam from the docker container

gst-launch-1.0 -v nvarguscamerasrc ! nvoverlaysink -e

I get this error:

(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: No such file or directory (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 201)
(Argus) Error FileOperationFailed: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 102)

Am I doing something wrong ??

Thanks

Try below step.

sudo systemctl daemon-reload
sudo systemctl restart docker
Export DISPLAY=:

xhost +

sudo docker run --net=host --runtime nvidia --rm --ipc=host -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /tmp/argus_socket:/tmp/argus_socket --cap-add SYS_PTRACE -e DISPLAY=$DISPLAY -it nvcr.io/nvidia/l4t-base:r32.2.1

2 Likes

Many thanks, the key part was to mount this volume “/tmp/argus_socket” when running the docker container

How should I proceed to fill a request to add this documentation to the wiki of https://github.com/NVIDIA/nvidia-docker/wiki/NVIDIA-Container-Runtime-on-Jetson ?

1 Like

Thanks for your report.
I will check with the author to check it.

1 Like

Thanks @ShaneCCC and @tibo.durand - I ran into this issue and it took me a fair few hours to find this thread.

I imagine a lot of people doing nvidia jetson course are going to bump into this issue. Is there anything that can be done to help others avoid this pot hole?

My setup is: Jetpack 4.5.1 and dli-nano-ai:v2.0.1-r32.5.0 and raspberry pi hq camera (imx477)

Hi williams.owen,

Please help to open a new topic if it’s still an issue. Thanks