系统:ubuntu18.04,~/.bashrc环境文件
1、配置CUDA路径;cudnn用deb包安装的,会直接被装到系统相应路径,不需要手动添加路径引用。
2、 ROS
# CUDA
export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:$CUDA_HOME/bin
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
# ROS
source /opt/ros/melodic/setup.bash
#export LD_LIBRARY_PATH=/opt/ros/melodic/lib:$LD_LIBRARY_PATH
# tensorrt
export PATH=$PATH:/usr/local/TensorRT-8.2.1.8
export LD_LIBRARY_PATH=/usr/local/TensorRT-8.2.1.8/lib:$LD_LIBRARY_PATH
export CUDA_INSTALL_DIR=/usr/local/cuda-11.3
export CUDNN_INSTALL_DIR=/usr/local/cuda-11.3
# add new cmake version
export PATH=$PATH:/opt/cmake-3.21.4/bin
#OpenCV_4.2.0
export PKG_CONFIG_PATH=/usr/local/opencv_4.2.0/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/opencv_4.2.0/lib:$LD_LIBRARY_PATH
#OpenCV_4.5.5
#export PKG_CONFIG_PATH=/usr/local/opencv_4.5.5/lib/pkgconfig
#export LD_LIBRARY_PATH=/usr/local/opencv_4.5.5/lib:$LD_LIBRARY_PATH