服务器相关总结

文章目录

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
相关推荐
银发控、3 分钟前
nginx静态资源
运维·nginx
老百姓懂点AI16 分钟前
[测试工程] 告别“玄学”评测:智能体来了(西南总部)基于AI agent指挥官的自动化Eval框架与AI调度官的回归测试
运维·人工智能·自动化
德育处主任Pro39 分钟前
『NAS』用SSH的方式连上NAS
运维·ssh
Meaauf43 分钟前
VMware安装中科方德服务器操作系统
运维·服务器·中科方德
南宫码农1 小时前
神马影视8.5版本如意伪静态+视频教程
linux·运维·centos
mftang1 小时前
现代互联网安全的基石: SSL/TLS技术介绍
服务器·网络·ssl
坐怀不乱杯魂1 小时前
Linux网络 - 网络层
linux·服务器·网络
j_xxx404_1 小时前
Linux:命令行参数与环境变量
linux·运维·服务器
j_xxx404_1 小时前
Linux:进程虚拟地址空间|虚拟内存管理
linux·运维·服务器
江畔何人初1 小时前
pod的定义以及创建过程
linux·运维·云原生