深度学习预备!安装双系统(Ubuntu20.04)+显卡驱动+CUDA+CUDNN+pytorch+pycharm(究极缝合)

(拯救者R7000P 2021 3060 版本)

一、卸载原有的双系统

https://blog.csdn.net/qq_42257666/article/details/120721561

二、制作U盘启动

https://blog.csdn.net/qq_40520596/article/details/95797056

三、安装显卡驱动

https://blog.csdn.net/Perfect886/article/details/119109380?spm=1001.2014.3001.5506

注意先进入bios开独显模式

不要加–no-opengl-files

因为加了之后 图形中使用的还是集成显卡,不是NVIDIA独立显卡

四、安装CUDA11.3、cudnn8.2.1+Anaconda

CUDA Toolkit 11.3 Downloads | NVIDIA Developer

 CUDA+CUDNN :

https://blog.csdn.net/weixin_40013731/article/details/125219993?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166081572816781683995382%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=166081572816781683995382&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~pc_rank_34-4-125219993-null-null.142^v42^pc_rank_34,185^v2^control&utm_term=ubuntu20.04%20cuda11.3&spm=1018.2226.3001.4187

Anaconda :

https://blog.csdn.net/KIK9973/article/details/118772450?spm=1001.2014.3001.5506

Do you wish the installer to initialize Anaconda3 in your /home/andrew/.bashrc ? [yes|no]  选 yes

修改环境变量,将Anaconda添加到用户环境变量中

gedit ~/.bashrc

在bashrc中增加如下内容:

export PATH="/home/north/anaconda3/bin:$PATH"

 五、pytorch、pycharm

在conda中创建自己的虚拟环境,再配置pytorch

conda create -n torch1.10 python=3.8 #创建虚拟环境
 
conda active torch1.10   #激活虚拟环境
 
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge

 

https://blog.csdn.net/CNjcdyl/article/details/125158395?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166082106516781667873072%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=166082106516781667873072&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~times_rank-3-125158395-null-null.142^v42^pc_rank_34,185^v2^control&utm_term=pycharm%20linux&spm=1018.2226.3001.4187

你可能感兴趣的:(pycharm,深度学习,pytorch)