Hello,
I’m trying to set up a Docker container on an NVIDIA AGX Orin with l4t-base R34.1 and install the necessary libraries and plugins. I am using the sample Dockerfile as a base and referring to this guide for the installation process.
However, I’m encountering an issue during the installation of the nvidia-l4t-core
package. The installation prompts me with an interactive question regarding the nvidia-tegra.conf
file, and I’ve been unable to suppress this prompt. I’ve tried several methods to bypass the interactive prompt, including using debconf-set-selections
and setting the DEBIAN_FRONTEND=noninteractive
environment variable, but the prompt still appears and causes the installation to fail.
Could anyone please help me with a solution to either:
- Prevent the interactive prompt during the installation of
nvidia-l4t-core
. - Suggest alternative methods for installing the necessary packages within a Docker container on AGX Orin?
Thank you for your time and assistance!
Dockerfile
ARG TAG
FROM nvcr.io/nvidia/l4t-base:r34.1
# Add NVIDIA Jetson repositories for AGX Orin
# Remove duplicate repository entries before adding
RUN sed -i '/deb https:\/\/repo.download.nvidia.com\/jetson\/common r34.1 main/d' /etc/apt/sources.list && \
sed -i '/deb https:\/\/repo.download.nvidia.com\/jetson\/t234 r34.1 main/d' /etc/apt/sources.list && \
echo "deb https://repo.download.nvidia.com/jetson/common r34.1 main" > /etc/apt/sources.list.d/nvidia-jetson.list && \
echo "deb https://repo.download.nvidia.com/jetson/t234 r34.1 main" >> /etc/apt/sources.list.d/nvidia-jetson.list && \
apt-key adv --fetch-key http://repo.download.nvidia.com/jetson/jetson-ota-public.asc && \
mkdir -p /opt/nvidia/l4t-packages/ && \
touch /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall && \
apt-get update
# Install nvidia-l4t-core
RUN \
# Predefine configuration answers (set installation confirmation for nvidia-tegra.conf to "false")
echo "nvidia-tegra.conf nvidia-tegra.conf/install boolean false" | debconf-set-selections && \
# Predefine configuration answers (disable recommendations for nvidia-l4t-core installation)
echo "nvidia-l4t-core nvidia-l4t-core/install_recommended boolean false" | debconf-set-selections && \
# Skip firmware upgrades
echo "nvidia-l4t-core nvidia-l4t-core/skip_firmware_upgrade boolean true" | debconf-set-selections && \
# Skip prompts regarding installation scripts
echo "nvidia-l4t-core nvidia-l4t-core/nvidia-tegra.conf-overwrite boolean false" | debconf-set-selections && \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-l4t-core -o Debug::pkgProblemResolver=true && \
# Force dpkg to continue (skip configuration file prompts)
dpkg --configure -a --force-confdef --force-confold && \
apt-get clean
# Install additional NVIDIA Jetson libraries and tools
RUN \
apt-get install --no-install-recommends -y \
nvidia-l4t-multimedia-utils \
nvidia-l4t-multimedia \
nvidia-l4t-cuda \
nvidia-l4t-x11 \
nvidia-l4t-camera \
nvidia-l4t-tools \
nvidia-l4t-graphics-demos \
nvidia-l4t-gstreamer \
nvidia-l4t-jetson-io \
nvidia-l4t-configs \
nvidia-l4t-3d-core \
nvidia-l4t-oem-config
# Install essential utilities and libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
libx11-dev \
libgl1-mesa-dev \
gstreamer1.0-tools \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-nice \
gstreamer1.0-omx \
gstreamer1.0-rtsp \
gstreamer1.0-vaapi \
gstreamer1.0-x \
nvidia-l4t-gstreamer \
&& rm -rf /var/lib/apt/lists/*
# Install CUDA developer packages
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-cuda-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install CuDNN developer packages
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-cudnn8-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install TensorRT developer packages
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-tensorrt-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install VPI developer packages
RUN mkdir -p /lib/firmware/
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-vpi-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install OpenCV developer packages
RUN apt-get update && apt-get install -y --no-install-recommends \
nvidia-opencv-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install Multimedia API samples & libraries
RUN apt-get update && apt-get download nvidia-l4t-jetson-multimedia-api \
&& dpkg-deb -R ./nvidia-l4t-jetson-multimedia-api_*_arm64.deb ./mm-api \
&& cp -r ./mm-api/usr/src/jetson_multimedia_api /usr/src/jetson_multimedia_api \
&& ./mm-api/DEBIAN/postinst \
&& rm -rf ./nvidia-l4t-jetson-multimedia-api_*_arm64.deb ./mm-api
# Update libraries
RUN ldconfig
# Install
#
# Install an application that uses gstreamer here
#
# Setup environment variables
ENV CUDA_HOME="/usr/local/cuda"
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
docker-compose.yml(Excerpt of the relevant part)
services:
device-connector:
build:
context: .
dockerfile: Dockerfile
depends_on:
intdash-agent:
condition: service_healthy
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: on-failure
environment:
- DC_PROCESS_SRC_CONF_COMMAND="gst-launch-1.0 -q v4l2src device=/dev/video0 ! videorate ! image/jpeg,width=1920,height=1080,framerate=15/1 ! queue ! jpegdec ! nvh264enc control-rate=2 iframeinterval=15 bitrate=3000000 insert-sps-pps=true insert-vui=true ! video/x-h264,stream-format=byte-stream ! queue ! h264parse ! queue ! fdsink fd=1"
- DISPLAY=${DISPLAY}
volumes:
- /tmp/argus_socket:/tmp/argus_socket
- /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra
- /usr/lib/aarch64-linux-gnu/tegra-egl:/usr/lib/aarch64-linux-gnu/tegra-egl
- /dev/video0:/dev/video0 # カメラデバイスのマウント
- /tmp/.X11-unix:/tmp/.X11-unix
network_mode: "host"