I want to use tensorRT on virtualenv

Hi!
I want to use tensorRT on virtualenv.
I already have tensorRT installed locally. How can I use tensorRT in the environment created by virtualenv? os is ubuntu 18.04.
Thanks!

1 Like

Hi @kubo1,
Once you have the tensorRT installed in your env, you need to be sure the path of the lib.
It should be
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<TensorRT-{version}/lib>
Kindly check the below link
https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing

Thanks!

@AakankshaS
thanks.
I can’t find <TensorRT-{version}/lib> path.
In my environment, there should be a path like tensorrt-6.0.1.10/lib, but I can’t find it. There is a folder called cpp and pdf in /use/share/doc/tensorrt-6.0.1.10. Is that different?

Thanks!

Hi @kubo1,
Yes, this is surely different.
Request you to check the installation guide.

Th elink to download TRT is
https://developer.nvidia.com/nvidia-tensorrt-7x-download

Thanks!

@AakankshaS
ok.
I already have tensorRT installed on jetson nano via jetpack. In that state, I want to use tensorRT on virtualenv. Do I still need to run the command below?

export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<TensorRT-{version}/lib>

Thanks!

Hi @kubo1,
Apologies for delayed response.
I believe so, as you will need to make your TRT visible to the environment.
Thanks!