配置 conda 以使用您本地的现场 AEN 存储库¶
您可以将 AEN 配置为使用本地现场 Anaconda 存储库服务器而不是 Anaconda.org。
要将 AEN 配置为使用本地现场存储库,您必须:
在计算节点上编辑 condarc ¶
注意:如果有您尚未镜像的频道,您必须将它们从配置中删除。
编辑文件.condarc
以匹配以下内容:
#/opt/wakari/anaconda/.condarc
channels:
- defaults
create_default_packages:
- anaconda-client
- ipykernel
# Default channels is needed for when users override the system .condarc
# with ~/.condarc. This ensures that "defaults" maps to your Anaconda Repository and not
# repo.anaconda.com
default_channels:
- http://<your Anaconda Repository name>:8080/conda/anaconda
- http://<your Anaconda Repository name>:8080/conda/wakari
- http://<your Anaconda Repository name>:8080/conda/r-channel
# Note: You must add the "conda" subdirectory to the end
channel_alias: http://<your Anaconda Repository name:8080/conda
注意:替换为本地 Anaconda Repository 安装的实际名称或 IP 地址。<your Anaconda Repository name>
配置 Anaconda 客户端¶
Anaconda 客户端允许用户从命令行使用 Repository,包括搜索包、登录、上传包等。
要为计算节点上的所有用户设置 anaconda-client 的默认配置:
sudo /opt/wakari/anaconda/bin/anaconda config --set url http://<your Anaconda Repository>:8080/api -s
注意: 需要 Sudo 是因为配置文件被写入根文件系统:/etc/xdg/binstar/config.yaml
.
注意:替换为本地 Anaconda Repository 安装的实际名称或 IP 地址。<your Anaconda Repository>