服务器相关总结

文章目录

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 小时前
Linux安装OpenProject
linux·运维
柏木乃一5 小时前
进程(2)进程概念与基本操作
linux·服务器·开发语言·性能优化·shell·进程
Lime-30905 小时前
制作Ubuntu 24.04-GPU服务器测试系统盘
linux·运维·ubuntu
代码or搬砖5 小时前
Nginx详讲
运维·nginx·dubbo
守城小轩5 小时前
基于Chrome140的Quora账号自动化——运行脚本(三)
运维·自动化·chrome devtools·指纹浏览器·浏览器开发
CloudJourney6 小时前
从Unix到OpenEuler及其关键协议解析
服务器·unix
百年渔翁_肯肯6 小时前
Linux 与 Unix 的核心区别(清晰对比版)
linux·运维·unix
胡闹546 小时前
Linux查询防火墙放过的端口并额外增加需要通过的端口命令
linux·运维·windows
AI科技星6 小时前
质量定义方程常数k = 4π m_p的来源、推导与意义
服务器·数据结构·人工智能·科技·算法·机器学习·生活
SongJX_7 小时前
DHCP服务
linux·运维·服务器