内部代理使用说明
为保障用户数据资产的安全,我们提供的智算节点和智算容器默认不允许直接访问互联网,需要用户手动配置代理。 算力城市云提供了 apt 代理、pip 代理、conda 代理三种代理服务,具体使用方式如下。
apt代理
注:适用于 ubuntu 操作系统。
在智算节点或智算容器中,配置 /etc/apt/apt.conf 文件,添加如下内容:
Acquire::http::proxy "http://192.168.3.241:3142";
Acquire::ftp::proxy "ftp://192.168.3.241:3142";
Acquire::https::proxy "http://192.168.3.241:3142";
配置上述文件后运行 apt update 刷新apt缓存后,即可通过代理使用 apt install 命令安装软件。
pip代理
在智算节点或智算容器中,配置 /etc/pip.conf 文件,添加如下内容:
[global]
index-url = http://192.168.12.70:9181/repository/pypi-proxy/simple/
trusted-host = 192.168.12.70
配置好改文件后即可使用 pip install 进行python包的下载安装。
conda代理
在智算节点或智算容器中,配置 /root/.condarc 文件,内容如下:
channels:
- http://192.168.12.70:9181/repository/conda-proxy/main
- http://192.168.12.70:9181/repository/conda-proxy/free
- http://192.168.12.70:9181/repository/conda-proxy/mro
- http://192.168.12.70:9181/repository/conda-proxy/msys2
- http://192.168.12.70:9181/repository/conda-proxy/pro
- http://192.168.12.70:9181/repository/conda-proxy/r
show_channel_urls: true
配置好上述文件后,即可使用 conda install 命令进行软件包的下载和安装。
