I want to use PyTorch, openCV, CUDA and C++ in Colab.
I found the project https://github.com/prabhuomkar/pytorch-cpp I like CMake for the CUDA option.
But when I do the following in Colab:
!git clone https://github.com/prabhuomkar/pytorch-cpp.git
In the cmake folder in the fetch_libtorch.cmake file I will set the fifth line set(CUDA_V "11.6" CACHE STRING "Determines libtorch CUDA version to download (11.3, 11.6 or none).")
And I continue in Colab
%cd pytorch-cpp
!cmake -B build
This error occurs:
*CMake Warning at CMakeLists.txt:25 (add_executable): Cannot generate a safe runtime search path for target pytorch-cpp because files in some directories may conflict with libraries in implicit directories:
runtime library [libcudnn.so.8] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/content/pytorch-cpp/libtorch/lib
Some of these libraries may not be found correctly.
CMake Warning at utils/image_io/CMakeLists.txt:10 (add_library): Cannot generate a safe runtime search path for target image-io because files in some directories may conflict with libraries in implicit directories:
runtime library [libcudnn.so.8] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/content/pytorch-cpp/libtorch/lib
Some of these libraries may not be found correctly.*
How to build CMake to avoid this error?
I tried changing CMakeLists.txt but I didn't find a solution