Grounding DINO TAO Deploy Integration Issues on Jetson

Environment Details

  • Platform: NVIDIA Jetson (ARM64) AGX Orin
  • OS: Linux 5.15.148-tegra
  • TensorRT Version: 10.3.0
  • Container: nvcr.io/nvidia/l4t-tensorrt:r10.3.0-devel
  • Model: Grounding DINO Swin Tiny Commercial Deployable (721MB)

Problem Summary

Attempting to run Grounding DINO model inference using TAO Deploy on NVIDIA Jetson device. The model requires custom TensorRT plugins that are not available in the standard L4T TensorRT container.

Model Details

  • Model: Grounding DINO Swin Tiny Commercial Deployable
  • Format: ONNX (721MB)
  • Architecture: Multi-input model requiring 6 inputs (image + 5 text-related tensors)
  • Special Requirements: Custom TensorRT plugins for deformable attention mechanisms

TAO Deploy Container Setup

1. Container Initialization

Command:

sudo docker run -it --rm --net=host --runtime nvidia \
  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix \
  nvcr.io/nvidia/l4t-tensorrt:r10.3.0-devel

Status: ✅ Successfully created L4T TensorRT container

2. Dependencies Installation

Commands:

apt update && apt install -y libopenmpi-dev
pip install torch torchvision torchaudio transformers onnx opencv-python tqdm pydantic hydra-core omegaconf pycocotools

Output:

Successfully installed annotated-types-0.7.0 antlr4-python3-runtime-4.9.3 certifi-2025.6.15 charset_normalizer-3.4.2 filelock-3.18.0 fsspec-2025.5.1 hf-xet-1.1.5 huggingface-hub-0.33.2 hydra-core-1.3.2 idna-3.10 jinja2-3.1.6 mpmath-1.3.0 networkx-3.4.2 omegaconf-2.3.0 onnx-1.18.0 opencv-python-4.11.0.86 packaging-25.0 protobuf-6.31.1 pydantic-2.11.7 pydantic-core-2.33.2 pyyaml-6.0.2 regex-2024.11.6 requests-2.32.4 safetensors-0.5.3 sympy-1.14.0 tokenizers-0.21.2 torch-2.7.1 torchaudio-2.7.1 torchvision-0.22.1 tqdm-4.67.1 transformers-4.53.1 typing-inspection-0.4.1 urllib3-2.5.0

Status: ✅ All dependencies installed successfully

3. TAO Deploy Installation Attempt

Command:

pip install nvidia_tao_deploy==5.0.0.423.dev0

Error:

ERROR: Could not find a version that satisfies the requirement nvidia_tao_deploy==5.0.0.423.dev0 (from versions: 4.0.0.1)
ERROR: No matching distribution found for nvidia_tao_deploy==5.0.0.423.dev0

Alternative Command:

pip install nvidia_tao_deploy

Error:

ERROR: Could not find a version that satisfies the requirement nvidia_tao_deploy

4. Manual TAO Deploy Setup

Commands:

# Copy TAO Deploy source to container
docker cp tao_deploy clever_curie:/workspace/

# Attempt installation from source
cd /workspace && python setup_l4t.py install

Error:

error in nvidia-tao-deploy setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Parse error at "'+https:/'": Expected stringEnd

TensorRT Engine Generation Attempts

1. Custom Engine Builder Script

Command:

python nvidia_tao_deploy/cv/grounding_dino/specs/GDINO/build_engine.py \
    --config nvidia_tao_deploy/cv/grounding_dino/specs/gen_trt_engine.yaml

Output:

[07/05/2025-11:35:34] [TRT] [I] [MemUsageChange] Init CUDA: CPU +13, GPU +0, now: CPU 111, GPU 9529 (MiB)
[07/05/2025-11:35:38] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +927, GPU +696, now: CPU 1081, GPU 10271 (MiB)
Loading ONNX model from: /workspace/nvidia_tao_deploy/cv/grounding_dino/specs/GDINO/grounding_dino_swin_tiny_commercial_deployable.onnx
[libprotobuf WARNING] Reading dangerously large protocol message. 721823941 bytes

Error:

[TRT] [E] IPluginRegistry::getCreator: Error Code 4: API Usage Error 
(Cannot find plugin: MultiscaleDeformableAttnPlugin_TRT, version: 1, namespace:.)
ERROR: Failed to parse ONNX model

Detailed Error:

In node 3234 with name: /model/transformer/encoder/layers.0/self_attn/MultiscaleDeformableAttnPlugin_TRT 
and operator: MultiscaleDeformableAttnPlugin_TRT (checkFallbackPluginImporter): 
INVALID_NODE: creator && "Plugin not found, are the plugin name, version, and namespace correct?"

2. Plugin Analysis

Missing Plugins Identified:

  • MultiscaleDeformableAttnPlugin_TRT (version 1)
  • Used in encoder layers 0-5 (self-attention)
  • Used in decoder layers 0-5 (cross-attention)
  • Total of 12 plugin instances in the model

Video Processing Pipeline

1. Mock Inference Implementation

Command:

python nvidia_tao_deploy/cv/grounding_dino/specs/GDINO/video_inference.py \
    --config nvidia_tao_deploy/cv/grounding_dino/specs/infer.yaml

Output:

Processing video: /workspace/nvidia_tao_deploy/cv/grounding_dino/specs/GDINO/Highway.mp4
Detection classes: ['car', 'truck', 'person', 'bicycle', 'motorcycle', 'traffic light', 'bus']
Video properties: 1280x720, 30 FPS, 4426 frames
Processed 4425 frames in 142.2 seconds
Average processing speed: 31.1 FPS
✓ Video processing completed!

Status: ✅ Video processing pipeline works with mock detections

Root Cause Analysis

1. Plugin Dependency Issue

Problem: The ONNX model contains custom TensorRT plugin operations that are not available in the standard L4T TensorRT container.

Evidence:

[TRT] [E] IPluginRegistry::getCreator: Error Code 4: API Usage Error 
(Cannot find plugin: MultiscaleDeformableAttnPlugin_TRT, version: 1, namespace:.)

2. Model Architecture Requirements

GDINO Model Characteristics:

  • Uses deformable attention mechanisms
  • Requires custom CUDA kernels for attention operations
  • Plugin operations cannot be replaced with standard TensorRT operations

3. Container Limitations

L4T TensorRT Container Issues:

  • Standard TensorRT installation without custom plugins
  • No TAO Deploy plugins pre-installed
  • Missing plugin registry for deformable attention operations

Attempted Solutions

1. TAO Deploy Installation

  • Approach: Install TAO Deploy from PyPI
  • Result: Version not available for ARM64/Jetson
  • Error: No matching distribution found

2. Source Installation

  • Approach: Install TAO Deploy from source code
  • Result: Setup script has dependency parsing issues
  • Error: Invalid install_requires format

3. Manual Plugin Building

  • Approach: Build custom plugins from source
  • Result: Requires TAO Deploy build environment
  • Status: Not attempted due to missing build tools

Current Status

✅ Working Components

  1. Container Environment: L4T TensorRT container with basic dependencies
  2. Video Processing Pipeline: Complete pipeline with mock detections
  3. Configuration Files: Proper configs for engine generation and inference
  4. Performance: 31.1 FPS video processing capability
  5. Model Loading: ONNX model loads successfully (721MB)

❌ Blocking Issues

  1. Missing TensorRT Plugin: MultiscaleDeformableAttnPlugin_TRT
  2. TAO Deploy Installation: No ARM64-compatible version available
  3. Plugin Registry: Custom plugins not available in standard container

Should I build custom plugin

# Requires TAO Deploy source code and build environment
cd $TAO_DEPLOY_ROOT/plugins
make MultiscaleDeformableAttnPlugin_TRT TARGET_ARCH=aarch64

The TAO Deploy integration is blocked by the requirement for custom TensorRT plugins that handle deformable attention mechanisms. The standard L4T TensorRT container does not include these plugins,

Please install tao-deploy 5.0 firstly. If you are using Jetpack6, please refer to Cannot use TAO Deploy in Jetson AGX Orin - #5 by Morganh.
Make sure the “detectnet_v2 --help” can work.

Grouding_dino is the new feature in TAO5.5. So, the tao-deploy 5.0 version does not cover it. You can git clone GitHub - NVIDIA/tao_deploy at tao_5.5_release to the docker and try to run.
Grouding_dino is the new feature in TAO5.5. So, the tao-deploy 5.0 version does not cover it. . Refer to Cannot use TAO Deploy in Jetson AGX Orin - #11 by Morganh to try the existing 5.5 code to make it work in 5.0 deploy docker.

Please check if it is available.
$ nm -gDC /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so |grep MultiscaleDeformableAttn

My device is
NVIDIA NVIDIA Jetson AGX Orin Developer Kit
L4T 36.4.4 [ JetPack 6.2.1 ]
Ubuntu 22.04.5 LTS
Kernel Version: 5.15.148-tegra
CUDA 12.6.68
CUDA Architecture: 8.7
OpenCV version: 4.8.0
OpenCV Cuda: NO
CUDNN: ii libcudnn9
TensorRT: 10.3.0.30
Vision Works: NOT_INSTALLED
VPI: 3.2.4
Vulcan: 1.3.204

Im not able to install the nvidia-tao-deploy 5.0 version even after following the steps:

vim /etc/apt/sources.list   
to add below.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

$ apt update
$ apt install libc6
$ ldd --version
$ apt install libopenmpi-dev
$ pip install nvidia_tao_deploy==5.0.0.423.dev0

My jetson is in maxn mode. The libc6 install returns error

sudo apt install libc6
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libc6 is already the newest version (2.35-0ubuntu3.10).
The following packages were automatically installed and are no longer required:
  libavcodec58 libavfilter7 libavformat58 libavutil56 libpostproc55
  libssh-gcrypt-4 libswresample3 libswscale5 libvdpau1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
8 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up nvidia-l4t-bootloader (36.4.4-20250616085344) ...
Warning: Cannot get compatible board name.
3701--0004--1--auvidea-agx-orin-maxn-
TNSPEC 3701-500-0004-F.0-1-1-auvidea-agx-orin-maxn-
COMPATIBLE_SPEC 3701--0004--1--auvidea-agx-orin-maxn-
TEGRA_BOOT_STORAGE mmcblk0
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0004--1--auvidea-agx-orin-m
axn-.
Info: The esp is already mounted to /boot/efi.
INFO. Dump slots info:
Current version: 36.4.3
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0,             status: normal
slot: 1,             status: normal
INFO. Dump nv_boot_control.conf:
TNSPEC 3701-500-0004-F.0-1-1-auvidea-agx-orin-maxn-
COMPATIBLE_SPEC 3701--0004--1--auvidea-agx-orin-maxn-
TEGRA_BOOT_STORAGE mmcblk0
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
ERROR. 3701--0004--1--auvidea-agx-orin-maxn- does not match any known boar
ds.
dpkg: error processing package nvidia-l4t-bootloader (--configure):
 installed nvidia-l4t-bootloader package post-installation script subproce
ss returned error exit status 1
Setting up nvidia-l4t-kernel (5.15.148-tegra-36.4.4-20250616085344) ...
Using the existing boot entry 'primary'
Warning: Cannot get compatible board name.
3701--0004--1--auvidea-agx-orin-maxn-
TNSPEC 3701-500-0004-F.0-1-1-auvidea-agx-orin-maxn-
COMPATIBLE_SPEC 3701--0004--1--auvidea-agx-orin-maxn-
TEGRA_BOOT_STORAGE mmcblk0
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0004--1--auvidea-agx-orin-m
axn-.
Info: The esp is already mounted to /boot/efi.
Starting kernel post-install procedure.
Rootfs AB is not enabled.
ERROR. Procedure for A_kernel update FAILED.
Cannot install package. Exiting...
dpkg: error processing package nvidia-l4t-kernel (--configure):
 installed nvidia-l4t-kernel package post-installation script subprocess r
eturned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-heade
rs:
 nvidia-l4t-kernel-headers depends on nvidia-l4t-kernel (= 5.15.148-tegra-
36.4.4-20250616085344); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-kernel-headers (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followu
p error from a previous failure.
                                dpkg: dependency problems prevent configur
ation of nvidia-l4t-jetson-io:
 nvidia-l4t-jetson-io depends on nvidia-l4t-kernel (>> 5.15.148-tegra-36.4
-0); however:
  Package nvidia-l4t-kernel is not configured yet.
 nvidia-l4t-jetson-io depends on nvidia-l4t-kernel (<< 5.15.148-tegra-36.5
-0); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-jetson-io (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-oot-m
odules:
 nvidia-l4t-kernel-oot-modules depends on nvidia-l4t-kernel (= 5.15.148-te
gra-36.4.4-20250616085344); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-kernel-oot-modules (--configure)
:
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport re
port written because MaxReports is reached already
                                                  No apport report written
 because MaxReports is reached already
                                      No apport report written because Max
Reports is reached already
                          No apport report written because MaxReports is r
eached already
              dpkg: dependency problems prevent configuration of nvidia-l4
t-display-kernel:
 nvidia-l4t-display-kernel depends on nvidia-l4t-kernel (= 5.15.148-tegra-
36.4.4-20250616085344); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-display-kernel (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-oot-h
eaders:
 nvidia-l4t-kernel-oot-headers depends on nvidia-l4t-kernel (= 5.15.148-te
gra-36.4.4-20250616085344); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-kernel-oot-headers (--configure)
:
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-dtbs:
 nvidia-l4t-kernel-dtbs depends on nvidia-l4t-kernel (= 5.15.148-tegra-36.
4.4-20250616085344); however:
  Package nvidia-l4t-kernel is not configured yet.

dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
 dependency problems - leaving unconfigured
Processing triggers for nvidia-l4t-initrd (36.4.4-20250616085344) ...
Include /etc/nv-update-initrd/list.d/binlist
Include /etc/nv-update-initrd/list.d/modules
nv-update-initrd: Updating /boot/initrd from /etc/nv-update-initrd/list.d 
for kernel version 5.15.148-tegra..
Add /usr/sbin/nvluks-srv-app
Add /lib/modules/5.15.148-tegra/updates/drivers/net/ethernet/nvidia/nvethe
rnet/nvethernet.ko
Add /lib/modules/5.15.148-tegra/updates/drivers/nvpps/nvpps.ko
Add /lib/modules/5.15.148-tegra/updates/drivers/net/ethernet/realtek/r8126
/r8126.ko
Add /lib/modules/5.15.148-tegra/updates/drivers/net/ethernet/realtek/r8168
/r8168.ko
Add /lib/modules/5.15.148-tegra/modules*
Add /lib/modules/5.15.148-tegra/kernel/drivers/nvme/host/nvme.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/nvme/host/nvme-core.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/thermal/tegra/tegra-bpmp-th
ermal.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/pwm/pwm-tegra.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/hwmon/pwm-fan.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/pci/controller/dwc/pcie-teg
ra194.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/phy/tegra/phy-tegra194-p2u.
ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/usb/gadget/udc/tegra-xudc.k
o
Add /lib/modules/5.15.148-tegra/kernel/drivers/usb/typec/ucsi/typec_ucsi.k
o
Add /lib/modules/5.15.148-tegra/kernel/drivers/usb/typec/ucsi/ucsi_ccg.ko
Add /lib/modules/5.15.148-tegra/kernel/drivers/usb/typec/typec.ko
Updating modprobe.d configuration directories for modprobe..
Add config /etc/modprobe.d/alsa-base.conf
Add config /etc/modprobe.d/bcmdhd.conf
Add config /etc/modprobe.d/blacklist-ath_pci.conf
Add config /etc/modprobe.d/blacklist.conf
Add config /etc/modprobe.d/blacklist-firewire.conf
Add config /etc/modprobe.d/blacklist-framebuffer.conf
Add config /etc/modprobe.d/blacklist-modem.conf
Add config-link /etc/modprobe.d/blacklist-oss.conf
Add config /etc/modprobe.d/blacklist-rare-network.conf
Add config /etc/modprobe.d/denylist-nouveau.conf
Add config /etc/modprobe.d/denylist-oot-modules-audio.conf
Add config /etc/modprobe.d/denylist-ramoops.conf
Add config /etc/modprobe.d/denylist-tegra-safety.conf
Add config /etc/modprobe.d/denylist-tpm-ftpm-tee.conf
Add config /etc/modprobe.d/iwlwifi.conf
Add config /etc/modprobe.d/nvgpu.conf
Add config /etc/modprobe.d/nvidia-display.conf
Add config /etc/modprobe.d/tegra-udrm.conf
Add config /lib/modprobe.d/aliases.conf
Add config /lib/modprobe.d/fbdev-blacklist.conf
Add config /lib/modprobe.d/systemd.conf
Cleaning up the temporary directory for updating the initrd..
Errors were encountered while processing:
 nvidia-l4t-bootloader
 nvidia-l4t-kernel
 nvidia-l4t-kernel-headers
 nvidia-l4t-jetson-io
 nvidia-l4t-kernel-oot-modules
 nvidia-l4t-display-kernel
 nvidia-l4t-kernel-oot-headers
 nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)

The same for openmpi too

TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
ERROR. 3701--0004--1--auvidea-agx-orin-maxn- does not match any known boards.
dpkg: error processing package nvidia-l4t-bootloader (--configure):

And the pip install nvidia_tao_deploy==5.0.0.423.dev0 command not finding any package

pip install nvidia_tao_deploy==5.0.0.423.dev0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement nvidia_tao_deploy==5.0.0.423.dev0 (from versions: 4.0.0.1)
ERROR: No matching distribution found for nvidia_tao_deploy==5.0.0.423.dev0

Please note that below commands should be run inside the nvcr.io/nvidia/l4t-tensorrt:r8.5.2.2-devel. Please docker login into this container and double check.

In Jetpack6.0 + nvcr.io/nvidia/l4t-tensorrt:r8.5.2.2-devel

$ apt-get install vim
$ vim /etc/apt/sources.list   
to add below.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

$ apt update
$ apt install libc6
$ ldd --version
$ apt install libopenmpi-dev
$ pip install nvidia_tao_deploy==5.0.0.423.dev0
$ pip install https://files.pythonhosted.org/packages/f7/7a/ac2e37588fe552b49d8807215b7de224eef60a495391fdacc5fa13732d11/nvidia_eff_tao_encryption-0.1.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
$ pip install https://files.pythonhosted.org/packages/0d/05/6caf40aefc7ac44708b2dcd5403870181acc1ecdd93fa822370d10cc49f3/nvidia_eff-0.6.2-py38-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
$ detectnet_v2 --help