Download scripts/setup_env.sh from poet70/vla-sft-code-dreamzero: direct link, hf CLI and curl.
- Browser
- Download file 832 Bytes
-
https://huggingface.co/poet70/vla-sft-code-dreamzero/resolve/refs%2Fpr%2F1/scripts/setup_env.sh
- Command line
-
hf download hf://poet70/vla-sft-code-dreamzero@refs/pr/1/scripts/setup_env.sh
-
curl -L -o setup_env.sh https://huggingface.co/poet70/vla-sft-code-dreamzero/resolve/refs%2Fpr%2F1/scripts/setup_env.sh
832 Bytes
| # DreamZero 环境快速设置脚本 | |
| # | |
| # 用法: | |
| # source scripts/setup_env.sh # 中国网络(镜像站) | |
| # source scripts/setup_env.sh --offline # 无网络环境 | |
| set -euo pipefail | |
| MODE="${1:-mirror}" | |
| case "$MODE" in | |
| mirror) | |
| echo ">>> 设置 HF 镜像 (hf-mirror.com)" | |
| export HF_ENDPOINT=https://hf-mirror.com | |
| export PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple | |
| export PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn | |
| ;; | |
| offline) | |
| echo ">>> 离线模式" | |
| export HF_DATASETS_OFFLINE=1 | |
| export TRANSFORMERS_OFFLINE=1 | |
| export HF_HUB_DISABLE_TELEMETRY=1 | |
| ;; | |
| *) | |
| echo "Usage: source scripts/setup_env.sh [mirror|offline]" | |
| return 1 | |
| ;; | |
| esac | |
| echo ">>> 环境配置完成 (MODE=$MODE)" | |