I received the following warnings related to libnvinfer.so.7
and libnvinfer_plugin.so.7
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
- Download TAR Package NVIDIA TensorRT from here
$ tar xf TensorRT-8.5.2.2.Linux.x86_64-gnu.cuda-11.8.cudnn8.6.tar.gz
$ mkdir -p ~/local/opt
$ mv TensorRT-8.5.2.2 ~/local/opt
$ cd local/TensorRT-8.5.2.2
$ ln -s libnvinfer.so.8.5.2 libnvinfer.so.7
$ ln -s libnvinfer_plugin.so.8.5.2 libnvinfer_plugin.so.7
- Add following lines to
~/.bashrc
or~/.bashenv
(For bash users)
export LD_LIBRARY_PATH=~/local/opt/TensorRT-8.5.2.2/lib:$LD_LIBRARY_PATH
export TensorRT_ROOT=~/local/opt/TensorRT-8.5.2.2
Great! Thanks!