I am currently using NVIDIA-SMI 495.29.05, Driver Version: 495.29.05 and CUDA Version: 11.5. Alongside, I am using python3.10 and Tensorflow==2.11.0 (the highest version of TF that's compatible with my CUDA) for my conda virtual environment.

I have tried to run pip install tensorrt==8.5.1.7, pip install nvidia-tensorrt, and running the commands ln -s libnvinfer.so.8 libnvinfer.so.7, ln -s libnvinfer_plugin.so.8 libnvinfer_plugin.so.7 and ln -s libcudart.so.12 libcudart.so.11.0 in the following directories:

/home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/tensorrt/ /home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/nvidia/cuda_runtime/lib/

I have also to export the above directories using: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:

The steps I have followed are based on:

Could not load dynamic library 'libnvinfer.so.7'

https://github.com/tensorflow/tensorflow/issues/57679

I have also tried the following:

>>> from tensorflow.python.compiler.tensorrt import trt_convert as trt
>>> trt.trt_utils._pywrap_py_utils.get_linked_tensorrt_version()
(7, 2, 2)

My understanding is that Tensorflow==2.11.0 wants Tensorrt==7.2.2. However, I am unable to find this version and am unsure if this will be compatible with my CUDA (11.5).

Note: I am using a conda virutal environment (myenvi) and do not have permission to use sudo My conda base environment uses Python3.11 and Tensorflow2.14, which is not compatible CUDA11.5.

My ultimate aim is to be able to use Tensorflow and utilise my GPU.

Error:

2023-10-18 10:47:25.017773: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-18 10:47:25.940716: W tensorflow/compiler/xla/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: :/home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/tensorrt/:/home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/nvidia/cuda_runtime/lib/
2023-10-18 10:47:25.940841: W tensorflow/compiler/xla/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: :/home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/tensorrt/:/home/user/anaconda3/envs/myenvi/lib/python3.10/site-packages/nvidia/cuda_runtime/lib/
2023-10-18 10:47:25.940856: 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.
0

There are 0 answers