那得去nvidia官网下载一下cuda和驱动的整合包
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=CentOS&target_version=7&target_type=runfilelocal
还好CentOS和ubuntu上面的也一样
都是runfile
2.5GB,这个是cuda和显示卡驱动的整合,可以一起安装
不需要分开装驱动
官方安装说明
- Disable the Nouveau drivers:
- Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau options nouveau modeset=0
- Regenerate the kernel initramfs:
$ sudo dracut --force
- Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
- Reboot into runlevel 3 by temporarily adding the number "3" and the word "nomodeset" to the end of the system's kernel boot parameters.
- Run the installer silently to install with the default selections (implies acceptance of the EULA):
sudo sh cuda_<version>_linux.run --silent
- Create an xorg.conf file to use the NVIDIA GPU for display:
$ sudo nvidia-xconfig
- Reboot the system to load the graphical interface.
- Set up the development environment by modifying the PATH and LD_LIBRARY_PATH variables:
$ export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}} $ export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- Install a writable copy of the samples then build and run the nbody sample:
$ cuda-install-samples-10.1.sh ~ $ cd ~/NVIDIA_CUDA-10.1_Samples/5_Simulations/nbody $ make $ ./nbody