deepin20.3+nvidia460.27+cuda11.2+cudnn8.1.1+anconda3.2021.11+paddle2.1.2

1. 下载deepin 20.3和U盘写入工具,并按提示安装系统

步骤:

1. 到官方网站下载deepin20.3和U盘写入工具

2. 使用U盘,根据提示安装deepin20.3

3. 安装时选择安装nvidia驱动

4. 安装完毕后,关闭grub主题,设置->通用信息->主题(关闭)

5. 拷贝下载好的cuda,cudnn,anconda到home目录

备注:

1. https://www.deepin.org/zh/download/

2. https://developer.nvidia.com/cuda-toolkit-archive

3. https://developer.nvidia.com/cudnn

4. https://www.nvidia.cn/geforce/drivers/

5. https://www.nvidia.cn/Download/index.aspx?lang=cn

6. https://developer.nvidia.cn/zh-cn/cuda-gpus

 

2. 使用root进行安装,重装NVIDIA显卡驱动,然后安装cuda和cudnn

步骤:

1. 用户登录前按ctrl+alt+f2进入tty2模式

2. 设置root用户密码,并进入root用户

sudo passwd

su root

3. 关闭桌面环境

service lightdm stop

4. 卸载系统自带的NVIDIA驱动

apt update

apt purge nvidia*

5. 安装cuda包中的driver,cuda toolkit,cuda samples,注意需要设置librarypath=/usr/local/cuda。建议到官方网站下载适合版本的驱动,然后单独安装。卸载使用命令为nvidia-uninstall、cuda-uninstaller

chmod +x cuda_xxx.run

./cuda_xxx --driver --toolkit --samples --librarypath=/usr/local/cuda

6. 如果安装成功,查看是否禁止nouveau,和nvidia驱动是否正常运行,否则nvidia驱动和nvidia-smi无法正常运行

vim /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

blacklist nouveau

options nouveau modeset=0

update-initramfs -u

lsmod | grep nouveau

lsmod | grep nvidia

nvidia-smi

7. 安装cudnn

tar zxvf cudnn-xxx.tar.gz -C /usr/local/

8. 添加系统路径,并查看路径是否生效

vim /etc/profile

export PATH=/usr/local/cuda-xxx/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/cuda-xxx/lib64:$LD_LIBRARY_PATH

source /etc/profile

nvcc -V

9. 开启桌面环境,并重启

service lightdm start

reboot

10. 验证是否安装成功

cd NVIDIA_CUDA-XXX/1_Utilties/deviceQuery

sudo apt install g++

make

sudo ./deviceQuery

 

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

备注:

系统自带的NVIDIA驱动不完整,没有nvidia-smi。需要重新安装完整版驱动。

 

3. 解决一下系统问题

1. 开机画面显示“Error:Driver 'pcspkr' is already registered, aborting...

sudo vim /etc/modprobe.d/blacklist-pcspkr.conf

blacklist pcspkr

sudo update-inittramfs -u

2. 外接屏幕无法显示,设置后外接屏幕可以显示,但是笔记本屏幕无法显示,这问题主要时nvidia驱动问题,下面为临时解决办法。建议更新合适显卡驱动,请到官网下载https://www.nvidia.cn/Download/index.aspx?lang=cn,更新驱动后,如此出现Firmware Bug可以在BIOS中关闭firmwareTPM,问题全部解决。但是接外屏时还是,笔记本内屏还是无法显示,应该还是NVIDIA驱动问题,可以试试其他版本驱动。

 

[ 1.327039] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80 

[ 1.327028] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80 

1.

sudo vim /etc/defual/grub

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nomodeset”

sudo update-grub2

2.

开机后进入BIOS设置Security Settings ->  firmware TPM -> disable

3. 安装NVIDIA驱动中的这警告可以忽略WARNING: Unable to determine the path to install the libglvnd EGL vendor library config files. Check

https://blog.csdn.net/sdnuwjw/article/details/112311906

 

4. 安装anconda3.2021

1. 到官方网站下载安装包https://www.anaconda.com/

2. bash Anaconda3-2021.11-Linux-x86_64.sh

3. 2.pip换安装源

pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/

4. 查看安装源

vim .config/pip/pip.conf 或 pip config list

 

5. 安装paddle2.1.2

1. 到官网找到对应版本

https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html

2. 安装对于版本

python -m pip install paddlepaddle-gpu==2.1.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html

python

import paddle

paddle.utils.run_check()

 

6. 安装装机软件

1. 搜狗、迅雷、WPS、QQ、VSCode

2. 设置搜狗不显示工具栏

vim ~/.config/sogoupinyin/conf/env.ini

StatusApperarance=0

 

参考链接:

https://wiki.deepin.org/wiki/%E6%98%BE%E5%8D%A1#NVIDIA.E6.98.BE.E5.8D.A1

https://bbs.deepin.org/post/202329

https://bbs.deepin.org/post/194282

https://blog.51cto.com/u_15177056/2726082

https://bbs.deepin.org/post/217337

https://blog.csdn.net/qq_28656767/article/details/106278978

https://blog.csdn.net/qq_43659763/article/details/107640005?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-1-107640005.pc_agg_new_rank&utm_term=apt+get+nvidia+%E5%AE%89%E8%A3%85&spm=1000.2123.3001.4430

https://www.findhao.net/easycoding/2562.html

https://ywnz.com/linuxjc/8888.html

https://wiki.deepin.org/wiki/%E8%87%AA%E5%90%AF%E5%8A%A8%E7%A8%8B%E5%BA%8F

https://blog.csdn.net/hjw2719/article/details/109370553

https://ywnz.com/linuxjc/7888.html

https://blog.csdn.net/sdnuwjw/article/details/112311906

 

posted @ 2021-12-24 10:58  盛夏夜  阅读(577)  评论(0编辑  收藏  举报