服务器相关总结

文章目录

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
相关推荐
·薯条大王5 小时前
经济实惠玩云服务器|一台云服务器多人共用,子账号配置教程
java·linux·运维·服务器·汇编·c++·python
ZJH__GO8 小时前
网络编程v4pro--实现聊天室文件传输功能
java·服务器·网络·计算机网络
小小、码农8 小时前
Linux进程控制:从fork到exec,手写一个简易Shell
linux·运维·服务器
不会就选b8 小时前
Linux之进程间通信(二)---模拟进程池
linux·运维·服务器
NeilYuen9 小时前
用UDP实现向DNS服务器请求IP地址
服务器·tcp/ip·udp
沫璃染墨10 小时前
《从零入门Linux系统篇(十五):系统工具篇·六——GDB调试器详解:从程序执行控制到高级调试技巧》
linux·运维·服务器·c语言·c++
AIgorithmGEEK11 小时前
Linux 环境变量完全指南:从入门到理解底层原理
linux·运维·服务器
修罗王11 小时前
Linux Docker 服务管理与排查实战指南(新手速查版)
运维·docker
迪康Defender11 小时前
从静态存储到动态流转:终端透明加密两种模式实战解析
运维·服务器·网络·数据库·其他
酷可达拉斯12 小时前
Linux操作系统-升级OpenSSH修复漏洞
linux·运维·服务器·云计算