-
Notifications
You must be signed in to change notification settings - Fork 7
Installing TensorRT 10.x on Ubuntu 24.04
Louis Maddox edited this page Dec 15, 2025
·
10 revisions
Install NVIDIA TensorRT libraries for building/linking C++ projects or using frameworks that depend on TensorRT.
- Note: you will also need
- the parser library for compatibility with ONNX runtime
- the plugin headers
- NVIDIA GPU with compatible driver
- CUDA 12.x installed (tested with CUDA 12.4)
#!/bin/bash
set -e
# Download TensorRT local repo deb
wget https://developer.download.nvidia.com/compute/tensorrt/10.14.1/local_installers/nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb
# Install the local repo package
sudo dpkg -i nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb
# Add the GPG key
sudo cp /var/nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9/nv-tensorrt-local-*-keyring.gpg /usr/share/keyrings/
# Update apt
sudo apt update
# Install TensorRT core libraries
sudo apt install -y libnvinfer10 libnvinfer-plugin10 libnvinfer-vc-plugin10 libnvinfer-headers-dev libnvinfer-dev
# Cleanup
rm nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb
# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvinfer*Parser library installation:
sudo apt install -y libnvonnxparsers10 libnvonnxparsers-dev
# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvonnxparser*Plugin headers installation:
sudo apt install libnvinfer-plugin-dev
# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvinfer_plugin*- The Ubuntu 22.04 package works on Ubuntu 24.04 for the core libraries
-
Do not install the
tensorrtmetapackage directly — it pulls in Python bindings that require Python < 3.11, which fails if your system Python is more recent (which it should be) - The download is ~4.5GB and takes a while
- If you need Python bindings, install via pip separately:
pip install tensorrt-cu12(though this can be slow/hang, I didn't bother since I only need the library files themselves to build with) - For most build purposes (linking C++ projects, using with other frameworks), the core libraries are sufficient without Python bindings
If your build system can't find TensorRT:
export TENSORRT_ROOT=/usr
export TRT_LIBPATH=/usr/lib/x86_64-linux-gnu- Download page: https://developer.nvidia.com/tensorrt/download/10x
- Documentation: https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/installing.html
- GitHub (samples, plugins, ONNX parser): https://github.com/NVIDIA/TensorRT