服务器相关总结

文章目录

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
相关推荐
小安运维日记9 分钟前
Linux云计算 |【第四阶段】NOSQL-DAY1
linux·运维·redis·sql·云计算·nosql
kejijianwen1 小时前
JdbcTemplate常用方法一览AG网页参数绑定与数据寻址实操
服务器·数据库·oracle
m0_741768854 小时前
使用docker的小例子
运维·docker·容器
学习3人组4 小时前
CentOS 中配置 OpenJDK以及多版本管理
linux·运维·centos
厨 神5 小时前
vmware中的ubuntu系统扩容分区
linux·运维·ubuntu
Karoku0665 小时前
【网站架构部署与优化】web服务与http协议
linux·运维·服务器·数据库·http·架构
geek_Chen015 小时前
虚拟机共享文件夹开启后mnt/hgfs/下无sharefiles? --已解决
linux·运维·服务器
(⊙o⊙)~哦5 小时前
linux 解压缩
linux·运维·服务器
最新小梦6 小时前
Docker日志管理
运维·docker·容器
鸡鸭扣7 小时前
虚拟机:3、(待更)WSL2安装Ubuntu系统+实现GPU直通
linux·运维·ubuntu