WSL2 installation, configuration Cuda, pytorch records

WSL2 installation, configuration Cuda, pytorch records

Address of this article: blog.lucien.ink/archives/532

Recently, I ordered a mining card, and made a plate of dumplings for this plate of vinegar. Although I have expected deep learning before buying and e-sports after buying, it is still symbolic to configure the environment first.

Installation process

I'm using Windows 11, so some commands may not work as well as in Windows 10.

Install graphics driver

Go directly to NVIDIA official website to download the Game Ready driver.

Install WSL2

Personally, I prefer Debian, which is relatively lightweight.

wsl --install -d Debian

Execute after the installation is complete wslEnter Linux, execute it under Linux nvidia-smi, and there will be no problem in outputting graphics card information.

Install Miniconda

I personally don't recommend Anaconda very much, so I won't go into details.

Go to the Miniconda official website to download Miniconda3 Linux 64-bitthe version and install it.

Install pytorch-gpu

According to the prompt on the PyTorch official website , just execute the command.

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

QA

Q: Why choose Windows
A: At present, Windows is one of the best Linux distributions on the planet, and secondly, it is also the only choice that can satisfy learning and entertainment at the same time.

reference documents

  1. Install Linux on Windows with WSL
  2. CUDA on WSL User Guide

Guess you like

Origin blog.csdn.net/xs18952904/article/details/127892936