I am currently using a Orin NX dev kit with Jetpack 5.1.2 [L4T 35.4.1], and trying to get deepstream working inside a container. I’m currently following this guide:
https://docs.nvidia.com/metropolis/deepstream-nvaie30/dev-guide/text/DS_Quickstart.html
my directory is like so:
.
├── deepstream_sdk_v6.2.0_jetson.tbz2
├── dockerfile
and have copied the dockerfile exactly and tried building it.
# Use L4T tensorrt docker listed on https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-tensorrt/tags
# Use r8.5.1.7 for DS 6.2.0
FROM nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime
#Install vpi-dev and vpi-lib
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libnvvpi2 vpi2-dev vpi2-samples && \
rm -rf /var/lib/apt/lists/* && \
apt autoremove
# Install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
rsyslog git \
tzdata \
libgstrtspserver-1.0-0 \
libjansson4 \
libglib2.0-0 \
libjson-glib-1.0-0 \
librabbitmq4 \
gstreamer1.0-rtsp \
libyaml-cpp-dev \
libyaml-cpp0.6 \
libcurl4-openssl-dev \
ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
apt autoremove
# adding Cuda missing symlinks in base docker
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcufft.so.10 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcufft.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcublas.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcublas.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libcudnn.so.8 /usr/lib/aarch64-linux-gnu/libcudnn.so
RUN ln -s /usr/local/cuda-11.4/lib64/libcudart.so.11.0 /usr/local/cuda-11.4/lib64/libcudart.so
# Nvinfer libs:
RUN ln -s /usr/lib/aarch64-linux-gnu/libnvinfer.so.8 /usr/lib/aarch64-linux-gnu/libnvinfer.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libnvparsers.so.8 /usr/lib/aarch64-linux-gnu/libnvparsers.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libnvonnxparser.so.8 /usr/lib/aarch64-linux-gnu/libnvonnxparser.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libnvcaffe_parser.so.8 /usr/lib/aarch64-linux-gnu/libnvcaffe_parser.so
# NPP libs:
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppc.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppc.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppial.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppial.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppicc.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppicc.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppidei.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppidei.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppif.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppif.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppig.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppig.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppim.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppim.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppist.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppist.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppisu.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppisu.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppitc.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnppitc.so
RUN ln -s /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnpps.so.11 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnpps.so
RUN ldconfig
# Install DeepStreamSDK using tar package.
ENV DS_REL_PKG deepstream_sdk_v6.2.0_jetson.tbz2
COPY "${DS_REL_PKG}" \
/
RUN DS_REL_PKG_DIR="${DS_REL_PKG%.tbz2}" && \
cd / && \
tar -xvf "${DS_REL_PKG}" -C / && \
cd /opt/nvidia/deepstream/deepstream && \
./install.sh && \
cd / && \
rm -rf "/${DS_REL_PKG}"
RUN ldconfig
CMD ["/bin/bash"]
WORKDIR /opt/nvidia/deepstream/deepstream
ENV LD_LIBRARY_PATH /usr/local/cuda-11.4/lib64
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
ENV LD_PRELOAD /usr/lib/aarch64-linux-gnu/libgomp.so.1:$LD_PRELOAD
when i run docker build -t deepstream:jetson .
, i get the following error:
kodifly@kodifly-desktop:~/LLM-ansible-control-node/docker$ docker build -t deepstream:jetson .
[+] Building 1.9s (2/2) FINISHED docker:default
=> [internal] load build definition from dockerfile 0.0s
=> => transferring dockerfile: 4.04kB 0.0s
=> ERROR [internal] load metadata for nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime 1.9s
------
> [internal] load metadata for nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime:
------
dockerfile:3
--------------------
1 | # Use L4T tensorrt docker listed on https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-tensorrt/tags
2 | # Use r8.5.1.7 for DS 6.2.0
3 | >>> FROM nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime
4 |
5 | #Install vpi-dev and vpi-lib
--------------------
ERROR: failed to solve: nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime: failed to resolve source metadata for nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime: nvcr.io/nvidia/l4t-tensorrt:r8.5.1.7-runtime: not found
taking a look at NVIDIA L4T TensorRT | NVIDIA NGC, it appears that the specific image is no longer there for some reason. So i tried using nvcr.io/nvidia/l4t-tensorrt:r8.5.2-runtime
as a base image instead. when i do however, I get errors when installing vpi
3.0s
=> ERROR [ 2/28] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libnvvpi2 vpi2-dev vpi2-samples 26.3s
------
> [ 2/28] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libnvvpi2 vpi2-dev vpi2-samples && rm -rf /var/lib/apt/lists/* && apt autoremove:
0.579 Get:1 https://repo.download.nvidia.com/jetson/common r35.4 InRelease [2555 B]
0.794 Get:2 https://repo.download.nvidia.com/jetson/common r35.4/main arm64 Packages [19.6 kB]
0.944 Get:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
2.382 Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
2.715 Get:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
3.046 Get:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
3.395 Get:7 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages [11.1 MB]
5.407 Get:8 http://ports.ubuntu.com/ubuntu-ports focal/multiverse arm64 Packages [139 kB]
5.419 Get:9 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages [1234 kB]
5.537 Get:10 http://ports.ubuntu.com/ubuntu-ports focal/restricted arm64 Packages [1317 B]
5.537 Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [3059 kB]
5.843 Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [1391 kB]
5.986 Get:13 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [10.7 kB]
6.487 Get:14 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [52.3 kB]
7.318 Get:15 http://ports.ubuntu.com/ubuntu-ports focal-backports/main arm64 Packages [54.8 kB]
7.488 Get:16 http://ports.ubuntu.com/ubuntu-ports focal-backports/universe arm64 Packages [27.8 kB]
7.606 Get:17 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [52.0 kB]
7.766 Get:18 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [2677 kB]
8.916 Get:19 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [1096 kB]
9.061 Get:20 http://ports.ubuntu.com/ubuntu-ports focal-security/multiverse arm64 Packages [4661 B]
9.206 Fetched 21.5 MB in 9s (2451 kB/s)
9.206 Reading package lists...
10.78 Reading package lists...
12.26 Building dependency tree...
12.68 Reading state information...
13.33 The following additional packages will be installed:
13.33 cupva-2.3-l4t
13.39 The following NEW packages will be installed:
13.40 cupva-2.3-l4t libnvvpi2 vpi2-dev vpi2-samples
13.63 0 upgraded, 4 newly installed, 0 to remove and 104 not upgraded.
13.63 Need to get 67.5 MB of archives.
13.63 After this operation, 322 MB of additional disk space will be used.
13.63 Get:1 https://repo.download.nvidia.com/jetson/common r35.4/main arm64 cupva-2.3-l4t arm64 2.3.0 [202 kB]
13.72 Get:2 https://repo.download.nvidia.com/jetson/common r35.4/main arm64 libnvvpi2 arm64 2.3.9 [51.4 MB]
17.86 Get:3 https://repo.download.nvidia.com/jetson/common r35.4/main arm64 vpi2-dev arm64 2.3.9 [80.9 kB]
17.87 Get:4 https://repo.download.nvidia.com/jetson/common r35.4/main arm64 vpi2-samples arm64 2.3.9 [15.8 MB]
19.24 debconf: delaying package configuration, since apt-utils is not installed
19.35 Fetched 67.5 MB in 5s (12.5 MB/s)
19.39 Selecting previously unselected package cupva-2.3-l4t.
(Reading database ... 36325 files and directories currently installed.)
19.50 Preparing to unpack .../cupva-2.3-l4t_2.3.0_arm64.deb ...
19.51 Unpacking cupva-2.3-l4t (2.3.0) ...
19.55 Selecting previously unselected package libnvvpi2.
19.55 Preparing to unpack .../libnvvpi2_2.3.9_arm64.deb ...
19.56 Unpacking libnvvpi2 (2.3.9) ...
24.95 Selecting previously unselected package vpi2-dev.
24.96 Preparing to unpack .../vpi2-dev_2.3.9_arm64.deb ...
24.96 Unpacking vpi2-dev (2.3.9) ...
25.01 Selecting previously unselected package vpi2-samples.
25.01 Preparing to unpack .../vpi2-samples_2.3.9_arm64.deb ...
25.02 Unpacking vpi2-samples (2.3.9) ...
25.43 Setting up cupva-2.3-l4t (2.3.0) ...
25.45 Setting up libnvvpi2 (2.3.9) ...
25.47 pva_allow and/or /etc/pva/allow.d missing! Falling back to force-overwrite of system allowlist
25.47 cp: cannot create regular file '/lib/firmware/pva_auth_allowlist': No such file or directory
25.47 dpkg: error processing package libnvvpi2 (--configure):
25.47 installed libnvvpi2 package post-installation script subprocess returned error exit status 1
25.47 dpkg: dependency problems prevent configuration of vpi2-dev:
25.47 vpi2-dev depends on libnvvpi2 (>= 2.3); however:
25.47 Package libnvvpi2 is not configured yet.
25.47
25.47 dpkg: error processing package vpi2-dev (--configure):
25.47 dependency problems - leaving unconfigured
25.47 dpkg: dependency problems prevent configuration of vpi2-samples:
25.47 vpi2-samples depends on vpi2-dev (>= 2.3); however:
25.47 Package vpi2-dev is not configured yet.
25.47
25.47 dpkg: error processing package vpi2-samples (--configure):
25.47 dependency problems - leaving unconfigured
25.47 Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
25.76 Errors were encountered while processing:
25.76 libnvvpi2
25.76 vpi2-dev
25.76 vpi2-samples
25.80 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
dockerfile.deepstream:6
--------------------
5 | #Install vpi-dev and vpi-lib
6 | >>> RUN apt-get update && \
7 | >>> DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
8 | >>> libnvvpi2 vpi2-dev vpi2-samples && \
9 | >>> rm -rf /var/lib/apt/lists/* && \
10 | >>> apt autoremove
11 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libnvvpi2 vpi2-dev vpi2-samples && rm -rf /var/lib/apt/lists/* && apt autoremove" did not complete successfully: exit code: 100
given the circumstances, what alternatives do i have in creating a container with deepstream? thanks