阿里云服务器(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 不用写端口号

继续/跳过/不再显示

输入密码

相关推荐
B站_计算机毕业设计之家3 分钟前
豆瓣电影推荐系统 | Python Django Echarts构建个性化影视推荐平台 大数据 毕业设计源码 (建议收藏)✅
大数据·python·机器学习·django·毕业设计·echarts·推荐算法
晓13137 分钟前
第七章 【C语言篇:文件】 文件全面解析
linux·c语言·开发语言
小镇敲码人9 分钟前
探索华为CANN框架中的ACL仓库
c++·python·华为·acl·cann
KIKIiiiiiiii9 分钟前
微信个人号API二次开发中的解决经验
java·人工智能·python·微信
ZH154558913111 分钟前
Flutter for OpenHarmony Python学习助手实战:Web开发框架应用的实现
python·学习·flutter
Ekehlaft13 分钟前
这款国产 AI,让 Python 小白也能玩转编程
开发语言·人工智能·python·ai·aipy
唐装鼠16 分钟前
Linux 下 malloc 内存分配机制详解
linux·malloc
予枫的编程笔记17 分钟前
【Linux入门篇】Linux运维必学:Vim核心操作详解,告别编辑器依赖
linux·人工智能·linux运维·vim操作教程·程序员工具·编辑器技巧·新手学vim
开源技术18 分钟前
Python GeoPandas基础知识:地图、投影和空间连接
开发语言·ide·python
hedley(●'◡'●)21 分钟前
基于cesium和vue的大疆司空模仿程序
前端·javascript·vue.js·python·typescript·无人机