seevomap / scripts /update_space.sh
akiwatanabe's picture
space: move runtime ownership into seevomap repo
9df93c8 verified
raw
history blame contribute delete
766 Bytes
#!/bin/bash
set -eo pipefail
echo "=== SeevoMap Space Update ==="
echo "Start: $(date)"
if [ -z "${HF_TOKEN:-}" ]; then
echo "HF_TOKEN is required in the environment." >&2
exit 1
fi
unset ALL_PROXY all_proxy HTTP_PROXY http_proxy HTTPS_PROXY https_proxy 2>/dev/null || true
source <(curl -sSL http://deploy.i.h.pjlab.org.cn/infra/scripts/setup_proxy.sh)
python <<'PYEOF'
import os
from huggingface_hub import HfApi
api = HfApi(token=os.environ["HF_TOKEN"])
api.upload_folder(
folder_path="/mnt/shared-storage-gpfs2/sciprismax2/zhouzhiwang/seevomap",
repo_id="akiwatanabe/seevomap",
repo_type="space",
commit_message="space: move runtime ownership into seevomap repo",
)
print("Space updated!")
PYEOF
echo "End: $(date)"
echo "=== Done ==="