Refactor HF_HUB_CACHE export to check for /data directory existence

This commit is contained in:
guofang committed 2026-11-09 23:11:23 +08:00
1 parent c903c253b9
commit f3751f4e82
1 file changed
+3 -1
+3 -1
View File
@@ -1,5 +1,7 @@
alias claude='env -u TERM_PROGRAM https_proxy=http://localhost:3128 claude'
alias codex="all_proxy=http://localhost:3128 codex --dangerously-bypass-approvals-and-sandbox"
alias hf="env -u HF_HUB_OFFLINE all_proxy=http://localhost:3128 hf"
export HF_HUB_CACHE=/data/guofang/.cache/huggingface/hub
if [ -d /data ]; then
export HF_HUB_CACHE=/data/guofang/.cache/huggingface/hub
fi
export HF_HUB_OFFLINE=1