服务器相关总结

文章目录

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
相关推荐
runepic2 分钟前
Python + PostgreSQL 批量图片分发脚本:分类、去重、断点续拷贝
服务器·数据库·python·postgresql
企鹅侠客1 小时前
Linux性能调优 详解磁盘工作流程及性能指标
linux·运维·服务器·性能调优
企鹅侠客1 小时前
Linux性能调优 再谈磁盘性能指标和进程级IO
linux·运维·服务器·性能调优
虚伪的空想家1 小时前
云镜像,虚拟机镜像怎么转换成容器镜像
服务器·docker·容器·k8s·镜像·云镜像·虚机
不过普通话一乙不改名2 小时前
Linux 网络收包的进阶之路:从普通 socket 到 AF_XDP 零拷贝
linux·运维·网络
在路上@Amos2 小时前
Linux 命令行查看 串口hex数据
linux·运维·服务器
人工智能训练2 小时前
Linux 系统核心快捷键表(可打印版)
linux·运维·服务器·人工智能·ubuntu·容器·openeuler
Vanranrr3 小时前
C++临时对象与悬空指针:一个导致资源加载失败的隐藏陷阱
服务器·c++·算法
dualven_in_csdn4 小时前
【疑难问题】某些win11机器 网卡统计也会引起dns client 占用cpu问题
运维·服务器·网络
sanduo1124 小时前
docker 构建编排过程中常见问题
运维·docker·容器