I am unable to install torch2trt from source(GitHub - NVIDIA-AI-IOT/torch2trt: An easy to use PyTorch to TensorRT converter), have installed the torch dependencies and NVCC version is visible(meaning the cuda path is specified). Getting the following error:-
:torch2trt$ python3 setup.py
Traceback (most recent call last):
File “setup.py”, line 24, in
plugins_ext_module = CUDAExtension(
File “/home/xxx/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py”, line 1074, in CUDAExtension
library_dirs += library_paths(cuda=True)
File “/home/xxx/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py”, line 1201, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
File “/home/xxx/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py”, line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. ’
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
Path is visible on bashrc:-
echo $CUDA_HOME
/usr/local/cuda-11.8