Deep learning deployment (Pytorch+windows)

Table of contents

NVIDIA GPU driver

NVIDIA GPU driver

Check the computer graphics card type (Computer - Properties - Device Manager - Display Adapter)

Enter NVIDIA official website ( official driver | NVIDIA ) to download the corresponding driver,

 Then install it by default.

After the installation is complete, check your driver version (NVIDIA Control Panel - System Information - Components)

CUDA ToolKit

Before installing CUDA, first look at 

Before installing CUDA, first go to the pytorch official website ( Start Locally | PyTorch ) to check which versions of cuda Pytorch supports:

Select the version you want to install, and download the corresponding CUDA from: CUDA Toolkit Archive | NVIDIA Developer

Of course, this CUDA version not only needs to support pytorch, but also must support the graphics card driver, which can be viewed  in CUDA 12.1 Update 1 Release Notes (nvidia.com)

Hidden

View the Cudnn corresponding to the current CUDA version, and decompress it:

Copy these three folders to the cuda installation directory

At the same time, modify the environment variable

  

Anaconda

Download URL ( Free Download | Anaconda )

It can be installed by default after downloading.

Create a virtual environment in Anaconda:

conda create -n pytorch python=3.9

Set the mirror source (Ali source), search for .condarc in the user interface of the C drive. The replacement content is:

channels:
  - defaults
show_channel_urls: true
default_channels:
  - http://mirrors.aliyun.com/anaconda/pkgs/main
  - http://mirrors.aliyun.com/anaconda/pkgs/r
  - http://mirrors.aliyun.com/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.aliyun.com/anaconda/cloud
  msys2: http://mirrors.aliyun.com/anaconda/cloud
  bioconda: http://mirrors.aliyun.com/anaconda/cloud
  menpo: http://mirrors.aliyun.com/anaconda/cloud
  pytorch: http://mirrors.aliyun.com/anaconda/cloud
  simpleitk: http://mirrors.aliyun.com/anaconda/cloud
 

Pytorch

 Go to the pytorch official website ( Start Locally | PyTorch ), find the corresponding installation version, enter the conda virtual environment, and install pytorch

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

 Verify that the installation is complete

Supongo que te gusta

Origin blog.csdn.net/laiyinping/article/details/130717940
Recomendado
Clasificación