如果你的服务器处于内网,无法直接访问anaconda或者清华镜像源,那么你可以尝试自己搭建一个本地镜像站点。
同步数据
安装conda
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.10-Linux-x86_64.sh
bash Miniconda3-4.7.10-Linux-x86_64.sh
需额外安装 pyquery 和 conda-build
pip install pyquery
conda install conda-build
下载清华的 anaconda.py
wget https://raw.githubusercontent.com/tuna/tunasync-scripts/master/anaconda.py
修改CONDA_REPOS, 我们只需要 main 和 free
CONDA_REPOS = ("main", "free")
修改 CONDA_ARCHES, 使其只下载 64位Linux对应的内容
CONDA_ARCHES = ("linux-64", )
修改CONDA_CLOULD_REPOS, 使其只下载 conda-forge 和 bioconda 等内容
CONDA_ARCHES = (
"conda-forge/linux-64",
"bioconda/linux-64",
)
删除或者注释掉如下内容,我们不需要下载miniconda和archive
for dist in ("archive", "miniconda"):
remote_url = "{}/{}"