RTX3080/RTX3090驱动安装CUDA11.1+CUDNN8.0.4.30+pytorch源码编译
程序员文章站
2022-06-05 22:08:41
...
RTX3080+pytorch-gpu
一、nvidia官网下载nvidia-driver455.23以上,cuda11.1,cudnn-v8.0.4.30
确保nvidia-driver、cuda11.1、cudnn8.0.4.30安装成功
- NVIDIA-Linux-x86_64-455.23.04.run
- cuda_11.1.0_455.23.05_linux.run
- cudnn-11.1-linux-x64-v8.0.4.30.tgz
二、pytorch+torchvision源码编译
-
conda create -n pytorch python=3.7
-
pip install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
-
git clone --recursive https://github.com/pytorch/pytorch cd pytorch git submodule sync git submodule update --init --recursive
-
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} python setup.py install
-
成功之后重启终端
python >>> import torch >>> torch.__version__ '1.8.0a0+3d421b3' >>> torch.cuda.is_available() True
-
git clone --recursive https://github.com/pytorch/vision.git
-
cd vision/ python setup.py install
-
重启终端
-
>>> import torchvision >>> torchvision.__version__ '0.8.0a0+a9c78f1' >>>
三、tensorflow安装
pip install tf-nightly-gpu
>>> tf.__version__ '2.4.0-dev20201014'
上一篇: pandas数据加载、存储与文件格式