Skip to content

Commit

Permalink
📝 doc(pytorch.md): update mirror site configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rtzz committed Sep 18, 2024
1 parent 6c38445 commit 2308ec0
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions src/ai/pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,34 @@ pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118
### conda
添加清华镜像源
```shell
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
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# 若不含有`~/.condarc`,生成它
ls ~/.condarc || conda config --set show_channel_urls yes

# 之后配置镜像源(南科大提供的额外软件包镜像可以加速安装CUDA版Pytorch)
tee ~/.condarc > /dev/null << EOF
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- 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/msys2
custom_channels:
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
deepmodeling: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
nvidia: https://mirrors.sustech.edu.cn/anaconda-extra/cloud
envs_dirs:
- your-path/anaconda3/envs # 替换为您的路径(另外,若安装的是miniconda3,请自行替换),不设置此项有可能安装在`~/.conda/envs`
EOF
```
#### 安装最新版
```shell
Expand Down

0 comments on commit 2308ec0

Please sign in to comment.