Installing ZED SDK 5.0 into docker image

I am on Jetson Orin Nano 8gb with Jetpack 6.2 and SDK 5.0

The device authorization fails when I install SDK during image building stage and gives the following error code when I run sudo /usr/local/zed/tools/ZED_Explorer in container:

admin@Jetson:/workspaces/isaac_ros-dev$ sudo /usr/local/zed/tools/ZED_Explorer
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
nvbufsurftransform: Could not get EGL display connection
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Stack trace (most recent call last):
#14   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#13   Object "/usr/local/zed/tools/ZED_Explorer", at 0x4616af, in 
#12   Object "/usr/lib/aarch64-linux-gnu/libc.so.6", at 0xffff887874cb, in __libc_start_main
#11   Object "/usr/lib/aarch64-linux-gnu/libc.so.6", at 0xffff887873fb, in 
#10   Object "/usr/local/zed/tools/ZED_Explorer", at 0x43bae3, in 
#9    Object "/usr/local/zed/tools/ZED_Explorer", at 0x4ae59b, in 
#8    Object "/usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff8b6886b3, in QApplicationPrivate::init()
#7    Object "/usr/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff8927cbe7, in QGuiApplicationPrivate::init()
#6    Object "/usr/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff88eb3f47, in QCoreApplicationPrivate::init()
#5    Object "/usr/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff892798db, in QGuiApplicationPrivate::createEventDispatcher()
#4    Object "/usr/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff8927942b, in QGuiApplicationPrivate::createPlatformIntegration()
#3    Object "/usr/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff88ca0f63, in QMessageLogger::fatal(char const*, ...) const
#2    Object "/usr/lib/aarch64-linux-gnu/libc.so.6", at 0xffff8878712f, in abort
#1    Object "/usr/lib/aarch64-linux-gnu/libc.so.6", at 0xffff8879a67b, in raise
#0    Object "/usr/lib/aarch64-linux-gnu/libc.so.6", at 0xffff887df200, in 
Aborted (Signal sent by tkill() 42772 0

The dockerfile to install SDK (top image layer):

ARG BASE_IMAGE=ubuntu:22.04
FROM ${BASE_IMAGE}

COPY src/isaac_ros_common/docker/scripts/docker_install-zed-aarch64.sh opt/zed/install-zed-aarch64.sh

RUN chmod +x opt/zed/install-zed-aarch64.sh && \
    opt/zed/install-zed-aarch64.sh

The installation bash script:

# Download dependencies for zed SDK installation RUN file
apt-get update -y || true
apt-get install --no-install-recommends lsb-release wget less zstd udev apt-transport-https -y

# Download zed SDK installation RUN file to /tmp directory
cd /tmp

wget -q --no-check-certificate -O ZED_SDK_Linux.run https://download.stereolabs.com/zedsdk/5.0/l4t36.4/jetsons
chmod 777 ./ZED_SDK_Linux.run
./ZED_SDK_Linux.run silent skip_od_module skip_python skip_drivers    
# Symlink required to use the streaming features on Jetson inside a container, based on
# https://github.com/stereolabs/zed-docker/blob/fd514606174d8bb09f21a229f1099205b284ecb6/4.X/l4t/devel/Dockerfile#L27C5-L27C95
ln -sf /usr/lib/aarch64-linux-gnu/tegra/libv4l2.so.0 /usr/lib/aarch64-linux-gnu/libv4l2.so

# Cleanup
rm -rf /usr/local/zed/resources/*
rm -rf ZED_SDK_Linux.run
rm -rf /var/lib/apt/lists/*

When I install the SDK in a running container instead of the image building stage, sudo /usr/local/zed/tools/ZED_Explorer runs successfully, after I have used this script (hyperlink) on the host machine to fix udev permission.

However I want to bake the SDK into the image, so I don’t have to install the SDK everytime I run the container. How do I achieve this? Thank you so much!

Hi @fahyen
Welcome to the StereoLabs community.

You are using NVIDIA Isaac ROS, so I recommend you ask the NVIDIA developer forum for support with their packages: