服务器相关总结

文章目录

conda 安装

查看conda版本

bash 复制代码
conda --version

查看当前conda的配置文件位置

bash 复制代码
conda config --show

编辑配置文件,默认路径是~/condarc

bash 复制代码
vim ~/.condarc 

在channels字段添加新的镜像源,例如清华镜像

bash 复制代码
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - defaults

显示所有的channel

bash 复制代码
conda config --show channels

添加清华镜像源

bash 复制代码
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

镜像源总结(手动加)

bash 复制代码
-i https://pypi.tuna.tsinghua.edu.cn/simple

创建环境

bash 复制代码
创建名为 myenv 的新虚拟环境
conda create --name myenv

创建名为 myenv 的新虚拟环境,并指定 Python 版本为3.8
conda create --name myenv python=3.8

激活创建好的虚拟环境
conda activate myenv

安装pytorch

pytorch官网

bash 复制代码
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia

安装transformers

bash 复制代码
pip install transformers
pip install transformers==2.7.0
相关推荐
HypoxiaDream17 小时前
LINUX-Ext系列⽂件系统
linux·运维·服务器
小毛驴85017 小时前
Linux curl 命令用法
linux·运维·chrome
李斯啦果17 小时前
【Linux】Linux目录配置
linux·运维·服务器
AI+程序员在路上17 小时前
linux下线程中pthread_detach与pthread_join区别
linux·运维·服务器
logocode_li17 小时前
说透 Linux Shell:命令与语法的底层执行逻辑
linux·运维·ssh
CHENKONG_CK17 小时前
晨控CK-LR08-E00与汇川H5U系列PLC配置MODBUSTCP通讯连接手册
linux·服务器·网络
来鸟 鸣间17 小时前
Linux下3个so库之间的关系
linux·运维
释怀不想释怀18 小时前
Linux文件上传(rz)和下载(sz)压缩(tar.gz)和解压(zip)
linux·运维·服务器
IOsetting18 小时前
金山云主机添加开机路由
运维·服务器·开发语言·网络·php
酉鬼女又兒18 小时前
零基础入门Linux指南:每天一个Linux命令_sed
linux·运维·服务器