Install the dependencies of tensorrtx
January 20, 2026 ยท View on GitHub
Using docker as development environment is strongly recommended, you may check HERE for the deployment instructions of docker container and ignore the rest of this document.
While if this is not your case, we always recommend using major LTS version of your OS, Nvidia driver, CUDA, and so on.
OS
Ubuntu-22.04 is recommended. It is strongly recommended to use apt to manage packages in Ubuntu.
Nvidia Related
Driver
You should install the nvidia driver first before anything else, go to Ubuntu Driver Installation Guide for more details.
NOTE: Since version 560, the installation step is a little different than before, check HERE for more details.
CUDA
Go to NVIDIA CUDA Installation Guide for Linux for the detailed steps.
NOTE:
- Do not forget to check Post-installation Actions to setup the environment correctly.
- Make your CUDA version comply with your driver version
- If you want multi-version CUDA, docker is strongly recommended.
TensorRT
check HERE to install TensorRT.
(Optional) OpenCV
sudo apt-get update && sudo apt install libgtk-3-dev libopencv-dev
Verify installation
dpkg -l | grep cuda
dpkg -l | grep nvinfer
dpkg -l | grep opencv