Document mirror and proxy defaults

This commit is contained in:
Codex
2026-06-24 23:10:52 +08:00
parent 65153eb4f6
commit 03d6326e26
2 changed files with 18 additions and 5 deletions

View File

@@ -29,13 +29,21 @@ git submodule update --init --recursive
./scripts/setup_env.sh
```
脚本会显式设置 B300 代理和国内 PyPI 源
脚本默认使用国内源和 B300 机器特定代理,避免直接访问外网导致下载失败
```bash
http://100.72.0.101:8888
https://mirrors.aliyun.com/pypi/simple/
```text
http_proxy=http://100.72.0.101:8888
https_proxy=http://100.72.0.101:8888
HTTP_PROXY=http://100.72.0.101:8888
HTTPS_PROXY=http://100.72.0.101:8888
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/
UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
HF_ENDPOINT=https://hf-mirror.com
```
其中 proxy 是当前 B300/g0049 环境的 machine-specific 配置。换到其他机器、其他集群或本地环境时,需要先确认代理地址是否仍然可用;如果不可用,应覆盖 `http_proxy``https_proxy``HTTP_PROXY``HTTPS_PROXY`或在无墙环境下显式清空这些变量。PyPI/uv/Hugging Face 镜像也可以通过上面的环境变量覆盖。
Python 依赖安装在仓库内 `.venv`,不会写入系统 Python。安装逻辑是
1. 先在 `.venv` 内安装 `uv`