服务器相关总结

文章目录

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
相关推荐
Chenyu_310几秒前
04.基于C++实现多线程TCP服务器与客户端通信
linux·服务器·网络·c++·tcp/ip·算法·visualstudio
程序媛刘刘7 分钟前
uniappx 使用体验
java·服务器·前端
程序员的世界你不懂8 分钟前
移动Android和IOS自动化中常见问题
android·运维·自动化
zzyh12345622 分钟前
springcloudalibaba负载均衡组件
运维·负载均衡
奔波霸的伶俐虫1 小时前
liunx磁盘挂载和jar启动命令
linux·运维·服务器
都市前线1 小时前
格雷希尔: G80P系列在制动卡钳行业自动化应用
运维·自动化
开源优测2 小时前
使用pytest-xdist让自动化并行测试变得轻松简单
运维·自动化·pytest
bxp13213 小时前
gitlab add an ssh key 多个ssh配置
运维·ssh·gitlab
一直在学习的小白~4 小时前
Nginx 服务器,Apache 服务器,IIS 服务器的区别
服务器·nginx·apache
羑悻的小杀马特4 小时前
蓝耘携手通义万象 2.1 图生视频:开启创意无限的共享新时代
服务器·nginx·音视频·ai大模型·蓝耘·通义万象 2.1