fix(install): make setup failures explicit and atomic

Installer pipelines masked dependency and download failures, causing
false success messages and unsafe config replacement.

Atomic updates and current upstream installers keep failures visible.
This commit is contained in:
Frank Qing
2026-07-15 00:16:33 +08:00
parent 9641876d43
commit 76395923ce
14 changed files with 350 additions and 432 deletions
+12 -11
View File
@@ -14,14 +14,15 @@
# Set cur_dir before sourcing so prep_env.sh uses the correct path
export cur_dir="/workspace/vscode"
# Patch prep_env.sh for zsh compatibility before sourcing
source <(sed -e 's/^shopt -s histappend$/[[ -n "${BASH_VERSION}" ]] \&\& shopt -s histappend/' \
-e 's/\${!\([^}]*\)}/${(P)\1}/g' \
-e 's/cur_dir="\$(cd "\$(dirname "\$0")" && pwd)"/# cur_dir already set/g' \
/workspace/mlx/../vscode/prep_env.sh)
_prep_env="/workspace/vscode/prep_env.sh"
if [[ -r "$_prep_env" ]]; then
export cur_dir="/workspace/vscode"
source <(sed -e 's/^shopt -s histappend$/[[ -n "${BASH_VERSION}" ]] \&\& shopt -s histappend/' \
-e 's/\${!\([^}]*\)}/${(P)\1}/g' \
-e 's/cur_dir="\$(cd "\$(dirname "\$0")" && pwd)"/# cur_dir already set/g' \
"$_prep_env")
fi
unset _prep_env
# sh -c /opt/tiger/mlx_deploy/greeting.sh
@@ -33,7 +34,7 @@ if [ -f "/opt/tiger/rh2_bashrc" ]; then
source /opt/tiger/rh2_bashrc
fi
. "$HOME/.cargo/env"
[[ -r "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env"
# huggingface proxy
export HF_NETWORK_PROXY=http://huggingface-proxy-sg.byted.org
@@ -47,10 +48,10 @@ alias hf_mirror_external='export HF_ENDPOINT=$HF_MIRROR_EXTERNAL'
# http proxy
export HTTP_PROXY=http://sys-proxy-rd-relay.byted.org:8118
export HTTPS_PROXY=http://sys-proxy-rd-relay.byted.org:8118
export NO_PROXY=byted.org,bytedance.net,10.*.*.*,127.*.*.*
export NO_PROXY='byted.org,bytedance.net,10.*.*.*,127.*.*.*'
export http_proxy=http://sys-proxy-rd-relay.byted.org:8118
export https_proxy=http://sys-proxy-rd-relay.byted.org:8118
export no_proxy=byted.org,bytedance.net,10.*.*.*,127.*.*.*
export no_proxy='byted.org,bytedance.net,10.*.*.*,127.*.*.*'
alias proxy_on='export http_proxy=http://sys-proxy-rd-relay.byted.org:8118; export https_proxy=http://sys-proxy-rd-relay.byted.org:8118; export no_proxy=byted.org,bytedance.net,10.*.*.*,127.*.*.*; export HTTP_PROXY=http://sys-proxy-rd-relay.byted.org:8118; export HTTPS_PROXY=http://sys-proxy-rd-relay.byted.org:8118; export NO_PROXY=byted.org,bytedance.net,10.*.*.*,127.*.*.*'
alias proxy_off='unset http_proxy; unset https_proxy; unset no_proxy; unset HTTP_PROXY; unset HTTPS_PROXY; unset NO_PROXY'