文章目录
1.NVIDIA显卡驱动下载:
#最新版,房子home文件夹下
NVIDIA-Linux-x86_64-450.80.02.run
2.禁用 Nouveau 驱动程序
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
#在文件中插入如下两行
blacklist nouveau
options nouveau modeset=0
#更新系统
sudo update-initramfs -u
重启系统(一定要重启)
3.卸载原有驱动
CtrL+alt+F1进入无图命令界面(台式机),笔记本要+Fn
sudo service lightdm stop //关闭图形界面
sudo apt-get remove nvidia-* //卸载原有驱动
4.安装新驱动
sudo chmod a+x NVIDIA-Linux-x86_64-450.80.02.run
sudo ./NVIDIA-Linux-x86_64-450.80.02.run -no-x-check -no-nouveau-check -no-opengl-files
安装过程的选项:
1. The distribution-provided pre-install script failed! Are you sure
you want to continue? ---选择 yes
2. Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? --选择 No
3. 选择:install without signing
4. 选泽 ignore gcc version
5. Installing Nvidia's 32-bit compatibility libraries?-----选择 No
6. Would you like to run the nvidia-xconfigutility to automaticallyupdate your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.---选择 Yes
5.挂载显卡驱动及验证:
modprobe nvidia
nvidia-smi
# 重启
sudo reboot
补充:
如果过段时间GPU不好用了,显卡驱动显示不出来,别慌
1. 查看cuda
nvcc -V
1. 驱动存在则进行下一步
sudo apt-get install dkms
sudo dkms install -m nvidia -v 450.80.02
#450.80.02是你/usr/src目录中显卡文件夹的名字
3. 再看显卡驱动就可以了
nvidia-smi
6.cuda&cudann安装
见下面refer-2-Ubuntu16.04安装CUDA-10.1及cuDNN-v7.6,超详细的博客,感谢!
7.anaconda3-pip-conda换源
ubuntu16.04安装anaconda和改pip、conda源
8.tensorflow-gpu2.3安装
RTX2080Ti+Win10+Cuda10.1+Cudnn7.6+tensorflow-gpu2