服务器相关总结

文章目录

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
相关推荐
G_H_S_3_3 分钟前
【网络运维】Linux 文本处理利器:sed 命令
linux·运维·网络·操作文本
拾心2131 分钟前
【运维进阶】Linux 正则表达式
linux·运维·正则表达式
xcs194051 小时前
AI 自动化编程 trae 体验 页面添加富编辑器
运维·自动化·编辑器
Gss7771 小时前
源代码编译安装lamp
linux·运维·服务器
G_H_S_3_2 小时前
【网络运维】Linux:正则表达式
linux·运维·网络·正则表达式
敲上瘾2 小时前
Linux I/O 多路复用实战:Select/Poll 编程指南
linux·服务器·c语言·c++·select·tcp·poll
huangyuchi.2 小时前
【Linux系统】匿名管道以及进程池的简单实现
linux·运维·服务器·c++·管道·匿名管道·进程池简单实现
AAA修煤气灶刘哥2 小时前
手把手教你全流程项目部署:从 Jenkins 到 Nginx 的项目实战手册
java·运维·后端
czhc11400756633 小时前
LINUX 820 shell:shift,expect
linux·运维·excel
元清加油3 小时前
【Goland】:协程和通道
服务器·开发语言·后端·网络协议·golang