Try   HackMD

cuda安裝流程參考

https://pacess.blogspot.com/2017/03/install-cuda-8-on-centos-7.html

#記得先安裝
1.https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
2.https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=CentOS&target_version=7&target_type=rpmlocal
中的cuda與cuda driver


wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda-repo-rhel7-11-2-local-11.2.2_460.32.03-1.x86_64.rpm

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

sudo rpm -i cuda-repo-rhel7-11-2-local-11.2.2_460.32.03-1.x86_64.rpm
sudo yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
sudo yum clean all
sudo yum -y install nvidia-driver-latest-dkms cuda
sudo yum -y install cuda-drivers

reboot
vim /etc/profile
-----------------------------------------------------------------------------
export PATH=/usr/local/cuda-11.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:/usr/local/cuda-11.2/extras/CUPTI/lib64:$LD_LIBRARY_PATH
-----------------------------------------------------------------------------
mkdir ~/cuda-test
cd ~/cuda-test
cuda-install-samples-11.2.sh test
cd test
cd NVIDIA_CUDA-11.2_Samples/1_Utilities/deviceQuery
make
./deviceQuery