常用镜像设置
常用镜像设置

常用镜像设置

Tags
Mirror
Linux

Docker

For Ubuntu/CentOS
vim /etc/docker/daemon.json
修改为如下
{
    "registry-mirrors": ["https://g3xe0gm8.mirror.aliyuncs.com"]
}
然后重启Docker服务
systemctl restart docker.service

Pip

永久修改: linux下,修改 ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
 

Conda

conda 换成默认源
conda config --remove-key channels
linux 下,vim ~/.condarc
channels:
  - defaults
show_channel_urls: true
default_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
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: 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
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
其他的镜像源
# 中科大镜像源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/

# 阿里镜像源
conda config --add channels https://mirrors.aliyun.com/pypi/simple/

# 豆瓣的python的源
conda config --add channels http://pypi.douban.com/simple/ 

# 显示检索路径,每次安装包时会将包源路径显示出来
conda config --set show_channel_urls yes

conda config --set always_yes True

# 显示所有镜像通道路径命令
conda config --show channels
设置代理,在 ~/.condarc
proxy_servers:
  http: http://127.0.0.1:7890/
  https: http://127.0.0.1:7890/
ssl_verify: false

npm

对 npm 设置镜像
npm config set registry https://registry.npm.taobao.org

Loading Comments...