Libargus + Gstreamer in a Docker container

I have a Libargus program that works correctly outside of a docker container, but inside a container, I have the following error:

ERROR Could NOT find Argus (missing: ARGUS_INCLUDE_DIR)

To fix this error, I followed many forum posts which led me to make the Dockerfile below:

FROM dustynv/ros:melodic-ros-base-l4t-r32.7.1

# Resolves "Unable to locate package nvidia-l4t-jetson-multimedia-api"
RUN echo "deb https://repo.download.nvidia.com/jetson/common r32.7 main" > /etc/apt/sources.list.d/nvidia-l4t-apt-source.list && \
    echo "deb https://repo.download.nvidia.com/jetson/t194 r32.7  main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list && \
    apt-key adv --fetch-key http://repo.download.nvidia.com/jetson/jetson-ota-public.asc && \
    apt-get update

# Required installs, link is for cv-bridge
RUN apt-get install -y python3-catkin-tools
RUN apt-get install -y ros-melodic-cv-bridge
RUN ln -s /usr/include/opencv4/opencv2/ /usr/include/opencv

# awk: cannot open /etc/nv_boot_control.conf (No such file or directory)
# dpkg: error processing archive /var/cache/apt/archives/nvidia-l4t-core_32.7.2-20220417024839_arm64.deb (--unpack):
#  new nvidia-l4t-core package pre-installation script subprocess returned error exit status 2
# Errors were encountered while processing:
#  /var/cache/apt/archives/nvidia-l4t-core_32.7.2-20220417024839_arm64.deb
# E: Sub-process /usr/bin/dpkg returned an error code (1)
RUN \
    mkdir -p /opt/nvidia/l4t-packages/ && \
    touch /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall && \
    apt-get update && \
    apt-get install -y --no-install-recommends nvidia-l4t-core

# ERROR Could NOT find Argus (missing: ARGUS_INCLUDE_DIR)
RUN apt-get install nvidia-l4t-jetson-multimedia-api

Now my problem is:

  • After installing nvidia-l4t-core (a dependency of nvidia-l4t-jetson-multimedia-api), it breaks gstreamer (and maybe opencv or cuda?). You can verify this with gst-inspect-1.0 -b, which will return many blacklisted files.
  • I think these blacklisted files are related to the error that my argus program is producing (printed below). You can verify a broken Libargus by trying to build one of the samples in /usr/src/jetson_multimedia_api/samples.
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Argus Version: 0.98.3 (multi-process)
Capturing from device 0 using sensor mode 1 (1936x1106)
(Argus) Error NotSupported: EXT_platform_device extension missing (in src/eglutils/EGLUtils.cpp, function getDefaultDisplay(), line 44)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
Failed to create FrameConsumer
CONSUMER: Waiting until producer is connected...
Error generated. /catkin_ws/src/multi_camera/nodes/multi_camera_node.cc, execute:279 Failed to start repeat capture request

This is the command I’m using to run my docker container:

docker run --net=host --ipc=host --runtime nvidia -v /tmp/:/tmp/ -v /usr/sbin/nvargus-daemon:/usr/sbin/nvargus-daemon --cap-add SYS_PTRACE -e DISPLAY=$DISPLAY -v /home/user/multi_camera:/catkin_ws/src/multi_camera -it --rm --privileged argus_image

Jetpack Version: 4.6.1

Hi @Hommus, on JetPack 4.x the libargus libraries are dynamically mounted into the container when --runtime nvidia is used, but the header files aren’t. What I would recommend trying, is to COPY in the /usr/src/jetson_multimedia_api directory from your device in your Dockerfile instead of attempting to install those packages (as you have found, those seem to create other conflicts)

Much appreciated @dusty_nv, this problem had me stitched up for a while!

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