I'm using tensorflow 2.16.1
on Ubuntu 22.04, tensorrt 10.0.0b6
, but when I import tensorflow I get the warning:
W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
I already exported the path to my path inside bashrc, and sourced it, as follows:
## Python
export PYTHONPATH=${PYTHONPATH}:${HOME}:/usr/lib/python3/dist-packages:/home/belal/.local/lib/python3.10/site-packages
export PATH="/usr/local/bin:/home/belal/.local/bin:$PATH"
export PYTHONWARNINGS="ignore:Unverified HTTPS request"
## Exports
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
## CUDA
export CUDA_PATH=/usr/local/cuda
export PATH=$CUDA_PATH/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH
## CUDNN
export CUDNN_PATH=/home/belal/.local/lib/python3.10/site-packages/nvidia/cudnn
export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$LD_LIBRARY_PATH
export TF_ENABLE_ONEDNN_OPTS=0
## TensorRT
export LD_LIBRARY_PATH=/usr/lib/python3.10/dist-packages/tensorrt:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/belal/.local/lib/python3.10/site-packages/tensorrt_libs:$LD_LIBRARY_PATH
still the error persists, my library path looks like:
$ echo $LD_LIBRARY_PATH | grep tensorrt
/home/belal/.local/lib/python3.10/site-packages/tensorrt_libs:
/usr/lib/python3.10/dist-packages/tensorrt:
/home/belal/.local/lib/python3.10/site-packages/nvidia/cudnn/lib:
/usr/local/cuda/lib64:
/usr/local/lib:
/usr/lib
I have tried solutions in:
Can you please tell me how can I fix this issue? thanks