深度学习环境工具使用说明
软件说明
- 系统已预置多种独立的 Anaconda 虚拟环境,涵盖不同版本的 PyTorch、TensorFlow 及对应的 CUDA,可通过环境安装工具按需切换使用;
- 环境一般1-3分钟完成安装,并设有进度指示,如果需要在编辑器中使用,可以查看 IDE切换解释器 方法.
在不同系统中打开环境工具
Windows 系统
在 Windows 系统中,可直接从桌面启动环境安装工具:
| 操作步骤 | 图标 |
|---|---|
| 1. 双击启动桌面上的 环境工具 .exe 图标 2. 根据引导选择合适的环境版本 |
![]() |
Pytorch预装环境
| 环境名称 | Python | PyTorch | CUDA | 说明 |
|---|---|---|---|---|
| py38-torch180-cuda111 | 3.8 | 1.8.0 | 11.1 | 30系显卡适用 |
| py38-torch190-cuda111 | 3.8 | 1.9.0 | 11.1 | 30系显卡适用 |
| py38-torch1110-cuda113 | 3.8 | 1.11.0 | 11.3 | 30系显卡适用 |
| py38-torch1120-cuda113 | 3.8 | 1.12.0 | 11.3 | 30系显卡适用 |
| py38-torch1130-cuda116 | 3.8 | 1.13.0 | 11.6 | 30系显卡适用 |
| py39-torch200-cuda118 | 3.9 | 2.0.0 | 11.8 | 40系、30系显卡适用 |
| py39-torch210-cuda121 | 3.9 | 2.1.0 | 12.1 | 40系、30系显卡适用 |
| py310-torch220-cuda121 | 3.10 | 2.2.0 | 12.1 | 40系、30系显卡适用 |
| py310-torch230-cuda121 | 3.10 | 2.3.0 | 12.1 | 40系、30系显卡适用 |
| py310-torch240-cuda124 | 3.10 | 2.4.0 | 12.4 | 40系、30系显卡适用 |
| py310-torch250-cuda124 | 3.10 | 2.5.0 | 12.4 | 40系、30系显卡适用 |
| py311-torch260-cuda126 | 3.11 | 2.6.0 | 12.6 | 40系、30系显卡适用 |
| py311-torch270-cuda128 | 3.11 | 2.7.0 | 12.8 | 50系显卡适用 |
| py311-torch280-cuda128 | 3.11 | 2.8.0 | 12.8 | 50系显卡适用 |
- 安装好需要的框架版本后,可运行以下代码验证PyTorch是否可以正常使用GPU;
import torch
print("PyTorch 版本:", torch.__version__)
print("GPU 是否可用:", "是" if torch.cuda.is_available() else "否")
if torch.cuda.is_available():
print("CUDA 版本:", torch.version.cuda)
print("cuDNN 版本:", torch.backends.cudnn.version())
print("当前GPU:", torch.cuda.get_device_name(0))
else:
print("未检测到GPU支持")
YOLO预装环境
| 环境名称 | Python | PyTorch | Yolo | CUDA | cuDNN | 说明 |
|---|---|---|---|---|---|---|
| py39-yolov5-torch201-cuda118 | 3.9 | 2.0.1 | 5 | 11.8 | 8.7 | 40系、30系显卡适用 |
| py39-yolov8-torch201-cuda118 | 3.9 | 2.0.1 | 8 | 11.8 | 8.7 | 40系、30系显卡适用 |
TensorFlow预装环境
特别说明
- TensorFlow自2.10版本之后不再原生支持Windows中使用GPU,如果您需要使用2.10之后版本请选择使用Ubuntu系统或者使用wsl方式;
- 目前TensorFlow直接部署在50系列Blackwell架构显卡中可能不能正常运行,如果您有此方面需要请查看nvida提供的容器部署方式,点击查看;
| 环境名称 | Python | TensorFlow | CUDA | cuDNN | 说明 |
|---|---|---|---|---|---|
| py38-tf260-cuda113 | 3.8 | 2.6.0 | 11.3 | 8.2 | 30系显卡适用 |
| py38-tf280-cuda113 | 3.8 | 2.8.0 | 11.3 | 8.2 | 30系显卡适用 |
| py38-tf2100-cuda113 | 3.8 | 2.10.0 | 11.3 | 8.2 | 30系显卡适用 |
| py39-tf2120-cuda118 | 3.9 | 2.12.0 | 11.8 | 8.9 | 40系、30系显卡适用,不支持windows |
| py310-tf2140-cuda118 | 3.10 | 2.14.0 | 11.8 | 8.7 | 40系、30系显卡适用,不支持windows |
| py310-tf2161-cuda123 | 3.10 | 2.16.0 | 12.3 | 8.9 | 40系、30系显卡适用,不支持windows |
| py311-tf2180-cuda125 | 3.11 | 2.18.0 | 12.5 | 9.3 | 40系、30系显卡适用,不支持windows |
验证方法
安装好需要的框架版本后,可运行以下代码验证TensorFlow是否可以正常使用GPU;
import tensorflow as tf
print("TensorFlow 版本:", tf.__version__)
gpus = tf.config.list_physical_devices('GPU')
print("GPU 是否可用:", "是" if gpus else "否")
if gpus:
try:
# 获取CUDA和cuDNN版本(TensorFlow 2.4+)
build_info = tf.sysconfig.get_build_info()
print("CUDA 版本:", build_info.get('cuda_version', '未知'))
print("cuDNN 版本:", build_info.get('cudnn_version', '未知'))
except:
print("无法获取CUDA/cuDNN版本信息")
else:
print("未检测到GPU支持")
参考资料
如果系统内置的版本无法满足您的需要,您可以自行安装其他版本;
