【深度学习环境】NVIDIA Driver、Cuda和Pytorch(centos9机器,要用到显示器)

发布于:2025-02-11 ⋅ 阅读:(36) ⋅ 点赞:(0)

一 、Anaconda install

Step 1

Go to the official website:

https://www.anaconda.com/download

Input your email and submit.

Step 2

Select your version, and click it to download.

二、 NIVIDIA driver install

Step 1

Go to the official website.

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

Step 2

Select the version that matches your GPU, and then click search.


Step 3

Download it.

Step 4

Add an executable permission to this run file.

sudo chmod +x NVIDIA-Linux-x86_64-550.142.run

Execute it.

sudo ./NVIDIA-Linux-x86_64-550.142.run

Step 5

disable the ‘nouveau’.

Please refer to this article.

https://developer.aliyun.com/article/1430626

Step 6

Close the Secure Boot mode. (Must use the display screen).

Execute instruction:

sudo systemctl reboot --firmware-setup

This command will restart the computer and go to BIOS Settings, turning off the Secure Boot.

Please refer to this article.

https://blog.csdn.net/qq_43222384/article/details/125998688

三、 Cuda install

Step 1

Go to the official website.

https://developer.nvidia.com/cuda-downloads

Choose your operating system etc.

Then, you could copy the instruction.


Execute it.

Step 2

Add an executable permission to this run file.

sudo chmod +x cuda_12.6.3_560.35.05_linux.run

Execute it.

sudo ./cuda_12.6.3_560.35.05_linux.run

During execution, you need to type ‘accept’.

Step 3

Set environment variables.

vim ~/.bashrc

Insert such content.

export PATH="/usr/local/cuda-12.6/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH"

四、Pytorch install

See another article:

https://jhguo.blog.csdn.net/article/details/144742764?spm=1001.2014.3001.5502


网站公告

今日签到

点亮在社区的每一天
去签到