I want to create an image with Deepstream 6.0.1 that contains all the requirements like CUDA and TensorRT.
I’m working on a Jetson Nano DevKit 4GB with all the JetPack installed, but the target Jetson have only a part of JetPack and don’t have CUDA libs. The devices are in headless mode, no display is used and will not be used at all.
I see that docker run -it --gpus=all nvcr.io/nvidia/deepstream-l4t:6.0.1-base
works just fine. But when I try to run the custom image I have the nvbufsurftransform: Could not get EGL display connection
error and can’t load the nvinfer plugin No such element or plugin 'nvinfer'
. DISPLAY
env is unset.
Does anybody see what is the problem or know how to build such an image?
Board: Jetson Nano DevKit 4GB
JetPack: 4.6.4
L4T: 32.7.4
DIstribution: Ubuntu 18.04
Kernel: Linux version 4.9.337-tegra (buildbrain@mobile-u64-5434-d8000) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) )
CUDA: 10.2.300
cuDNN: 8.2.1.32
TensorRT: 8.2.1.9
VPI: 1.2.3
How to replicate:
Build the image and run docker run -it --gpus=all <image-name> gst-inspect-1.0 nvinfer
The Dockerfile I use:
FROM arm64v8/ubuntu:bionic as base
WORKDIR /app
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
\
python3-pip \
\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
FROM base as l4t
ADD https://repo.download.nvidia.com/jetson/jetson-ota-public.asc /etc/apt/trusted.gpg.d/jetson-ota-public.asc
RUN chmod 644 /etc/apt/trusted.gpg.d/jetson-ota-public.asc \
\
&& 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/t210 r32.7 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list \
&& mkdir -p /opt/nvidia/l4t-packages/ && touch /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall \
\
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends -o Dpkg::Options::=--force-overwrite \
nvidia-l4t-cuda nvidia-l4t-gstreamer \
\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* \
&& echo "/usr/lib/aarch64-linux-gnu/tegra" > /etc/ld.so.conf.d/nvidia-tegra.conf && ldconfig
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
FROM l4t as cuda
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
\
nvidia-cuda nvidia-cudnn8 \
\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
FROM cuda as tensorrt
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
\
nvidia-tensorrt \
\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
FROM tensorrt as deepstream
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
\
libssl1.0.0 \
libgstreamer1.0-0 \
gstreamer1.0-tools \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
libgstreamer-plugins-base1.0-dev \
libgstrtspserver-1.0-0 \
libjansson4=2.11-1 \
\
curl \
\
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN curl -sO https://developer.download.nvidia.com/assets/Deepstream/DeepStream_6.0.1/deepstream_sdk_v6.0.1_jetson.tbz2 \
&& tar -xvf deepstream_sdk_v6.0.1_jetson.tbz2 -C / \
&& cd /opt/nvidia/deepstream/deepstream-6.0 \
&& ./install.sh \
&& ldconfig
Error log:
$ gst-inspect-1.0 nvinfer
nvbuf_utils: Could not get EGL display connection
(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: No such file or directory (in src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 205)
(Argus) Error FileOperationFailed: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 106)
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
(gst-plugin-scanner:791): GStreamer-WARNING **: 07:56:04.153: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory
nvbufsurftransform: Could not get EGL display connection
(gst-plugin-scanner:793): GStreamer-WARNING **: 07:56:04.586: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
nvbufsurftransform: Could not get EGL display connection
No such element or plugin 'nvinfer'