Spaces:
Running
Running
File size: 766 Bytes
9df93c8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/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 ==="
|