VPI does not work inside of docker container

VPI sample applications work perfectly outside of the container on Jetson Orin. However, the same sample gives VPI_ERROR_INTERNAL (EGL_BAD_DISPLAY), when I try to launch it inside of the docker container.

Hi,

Please execute the following command before launching the container:

$ xhost +

Thanks.

It didn’t help. Even when I connected display to Orin and run this command directly on it, still the same error occurs

Hi,

We can run VPI successfully with the following commands (with a physical display connected).
Please let us know if the same commands also work on your side or not.

$ export DISPLAY=:0           # might be :1
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-jetpack:r35.1.0

Within container:

$ apt update && apt install cmake
$ cd /opt/nvidia/vpi2/samples/10-perspwarp/
$ cmake .
$ make
$ ./vpi_sample_10_perspwarp cuda ../assets/pedestrians.mp4 
OpenCV: FFMPEG: tag 0x4745504d/'MPEG' is not supported with codec id 2 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
Frame: 1
Frame: 2
Frame: 3
Frame: 4
...

Thanks.

Thank you, it works now.
However, we don’t use monitors to work with Jetsons.
Is there a way we can use VPI without connected display?

Hi,

Please check if virtual display can meet your requirement or not:

Thanks.

Hi, thank you for the reply. Virtual display does not meet our needs. VPI does not work for us

@denis001 the VPI samples uses display to display the output. But if you are using VPI in your code and not displaying anything, then you dont need display. There is no depdency of VPI on display unless you want to display and look at the output.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.