svg-slm-scripts / boot.sh
abhiAI777's picture
Upload boot.sh with huggingface_hub
f8fee0e verified
Raw History Blame Contribute Delete
555 Bytes
#!/bin/bash
# Wrapper: run job, stream full log to HF every 60s so crashes are always visible.
cd /workspace
up() { python -c "
from huggingface_hub import HfApi
a=HfApi(token='$HF_TOKEN'); a.create_repo('aixonlab/svg-slm-4b-lora',exist_ok=True)
a.upload_file(path_or_fileobj='/workspace/all.log',path_in_repo='logs/all.log',repo_id='aixonlab/svg-slm-4b-lora')" >/dev/null 2>&1; }
pip install -q huggingface_hub >/dev/null 2>&1
bash run_pod.sh > all.log 2>&1 &
P=$!
while kill -0 $P 2>/dev/null; do up; sleep 60; done
echo "RUN_POD EXITED" >> all.log; up