Make CUDA Version 10.1.105 the default CUDA Version among other versions installed on my computer

Both CUDA Version 10.1.105 and CUDA version 11.5.1 are installed on my computer running on Ubuntu.

How can I make CUDA Version 10.1.105 the default CUDA version to solve the following warning?

[ WARN:0] global /home/installation/OpenCV/opencv/modules/dnn/src/cuda4dnn/init.hpp (42) checkVersions CUDART version 11050 reported by cuDNN 8301 does not match with the version reported by CUDART 10010 to solve the following warning?

In addition, does this warning affect the execution of the program?