阿里云服务器(vgn7i-vws) anaconda(py39)+pytorch1.12.0(cu113)

用xshell连接ip地址,端口号22,输入用户密码

安装anaconda 2022 10 py3.9

wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh

sha256sum Anaconda3-2022.10-Linux-x86_64.sh #校验数据完整性

chmod u+x Anaconda3-2022.10-Linux-x86_64.sh #添加执行权限

bash Anaconda3-2022.10-Linux-x86_64.sh #执行安装脚本

Do you accept the license terms? [yes|no]

yes

/home/anaconda3

yes

#添加环境变量

vim /etc/profile

i

(末尾)export PATH=/home/develop/anaconda3/bin:$PATH

:wq!

#查看conda版本

conda -V

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

conda config --show-sources

查看硬件版本,阿里云vgn7i-vws公共镜像需管理员权限装显卡驱动

lspci | grep -i vga

lspci | grep -i nvidia

安装驱动

sudo apt-get update

apt install ubuntu-drivers-common

ubuntu-drivers devices

sudo ubuntu-drivers autoinstall

查看驱动

nvidia-smi(看到11.4版本)

wget ......cuda11.4.sh

bash cuda11.4.sh

wget ......cudnn-CUDA11.x%28v8.9.3%29.sh

bash cudnn-CUDA11.x\(v8.9.3\).sh

重启生效

reboot

nvcc -V

装pytorch(cu113即可,cuda114向下兼容)

pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html

python

import torch

torch.version

VSCode连接

用户名@ip地址 root@127.xx.xx.xxx 不用写端口号

继续/跳过/不再显示

输入密码

相关推荐
阿巴~阿巴~2 小时前
帧长、MAC与ARP:解密局域网通信的底层逻辑与工程权衡
linux·服务器·网络·网络协议·tcp/ip·架构·以太网帧
oMcLin2 小时前
如何在 Manjaro Linux 上实现高效的 Ceph 存储集群,提升大规模文件存储的冗余性与性能?
linux·运维·ceph
BinaryBoss2 小时前
Python mongodb批量修改数据库某个字段
数据库·python·mongodb
旦莫2 小时前
自动化测试需求分析:从“做对”到“做好”的前提
python·测试开发·自动化·需求分析·ai测试
dagouaofei2 小时前
工作计划 PPT 使用 AI 生成,与传统制作方式有什么不同
人工智能·python·powerpoint
智航GIS2 小时前
10.2 Requests库入门
开发语言·python
hudawei9962 小时前
win和Mac在创建python虚拟环境,启动环境等操作的异同
windows·python·macos·虚拟环境
Chennnng2 小时前
ubuntu重装系统但是不改动文件的方法
linux·运维·ubuntu
2023自学中2 小时前
linux虚拟机 CentOS 7 , yum 前端工具的使用,安装 命令行多媒体播放器
linux
fpcc3 小时前
跟我学C++中级篇——Linux中文件和链接及重定向
linux·c++