# 50 系显卡 (SM120) 科学计算与深度学习环境在 WSL 上的搭建



## 深度学习环境搭建（Anaconda、CUDA13.0、cuDNN）

如果不是从源码构建，那么Pytorch和OpenMM安装不需要CUDA13.0和cuDNN。

#### Anaconda/Miniconda

[安装 Miniconda — Anaconda 文档](https://docs.anaconda.net.cn/miniconda/install/#quick-command-line-install)

#### CUDA13.0

[CUDA Toolkit 13.0 Update 2 Downloads | NVIDIA Developer](https://developer.nvidia.com/cuda-downloads)

Installer Type 选用 deb (network) 方便一点

#### cuDNN

[CUDA 深度神经网络库 (cuDNN) | NVIDIA 开发者](https://developer.nvidia.cn/cudnn)

## Pytorch安装

参考[Pytorch官网教程](https://pytorch.org/get-started/locally/)

**安装**

```shell
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu130
```

**检验**

```shell
python -c "import torch; print(f\"CUDA available: {'Yes' if torch.cuda.is_available() else 'No'}\"); print(f\"Number of CUDA devices: {torch.cuda.device_count() if torch.cuda.is_available() else 0}\"); print(f\"Device 0: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'No GPU'}\")"
```

## OpenMM安装

参考[2. Getting Started — OpenMM User Guide 8.4 documentation](https://docs.openmm.org/latest/userguide/application/01_getting_started.html)

**安装**

```shell
pip install openmm[cuda13]
```

**检验**

```shell
python -m openmm.testInstallation
```


---

> 作者: [fupcode](https://github.com/fupcode)  
> URL: https://fupcode.com/blog/posts/environment/dl-build/  

