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

继续/跳过/不再显示

输入密码

相关推荐
御承扬44 分钟前
编程素养提升之EffectivePython(Builder篇)
python·设计模式·1024程序员节
chenchihwen1 小时前
AI代码开发宝库系列:FAISS向量数据库
数据库·人工智能·python·faiss·1024程序员节
洛克大航海1 小时前
虚拟机 Ubuntu 中安装 Google Chrome 浏览器
linux·chrome·ubuntu
DeeplyMind2 小时前
AMD rocr-libhsakmt分析系列3-4:svm-reserve模式实现分析
linux·驱动开发·1024程序员节·amdgpu·kfd·rocr
大米粥哥哥2 小时前
Qt QProcess基于Linux的命令管道符号无效问题【已解决】
linux·qt·shell·qprocess·1024程序员节·管道符号
AI视觉网奇3 小时前
json 可视化 2025 coco json
python·1024程序员节
北京迅为3 小时前
【北京迅为】iTOP-4412精英版使用手册-第六十七章 USB鼠标驱动详解
linux·人工智能·嵌入式·4412
骑士9991113 小时前
rabbitMQ 的安装和使用
linux·rabbitmq
小白不想白a3 小时前
【shell】每日shell练习:系统备份文件管理/系统性能趋势分析
linux·服务器
mit6.8243 小时前
[nanoGPT] ChatGPT 的 LLM 的全栈实现 | 快速上手
python