DERBACH's picture
download
raw
1.24 kB
#!/usr/bin/env bash
set -euo pipefail
cd /home/ningyuxi/workspace/latent-rubric
export XDG_RUNTIME_DIR=/run/user/1006 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1006/bus
export CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=GPU-2a9c799b-ab9e-c677-db0e-379f480cb00f
export OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=2 MKL_NUM_THREADS=8 PYTHONPATH=. TOKENIZERS_PARALLELISM=false
exec 9>outputs/gpu1.lock
flock -n 9 || { echo 'Another latent-rubric GPU job owns the lock'; exit 1; }
systemctl --user stop latent-rubric-gpu1-reserve.service || true
restore_reservation() {
systemd-run --user --unit=latent-rubric-gpu1-reserve --collect --property=WorkingDirectory=/home/ningyuxi/workspace/latent-rubric --setenv=CUDA_DEVICE_ORDER=PCI_BUS_ID --setenv=CUDA_VISIBLE_DEVICES=GPU-2a9c799b-ab9e-c677-db0e-379f480cb00f /home/ningyuxi/workspace/latent-rubric/.venv/bin/python -u scripts/reserve_gpu.py || true
}
trap restore_reservation EXIT
.venv/bin/python - <<'PY'
import subprocess
out=subprocess.check_output(['nvidia-smi','-i','GPU-2a9c799b-ab9e-c677-db0e-379f480cb00f','--query-compute-apps=pid,process_name','--format=csv,noheader'],text=True).strip()
assert not out,f'Unexpected GPU1 process after releasing our reservation: {out}'
PY
"$@"

Xet Storage Details

Size:
1.24 kB
·
Xet hash:
c6daaca30446cf8bf93dbc3161675842d99c19eb468829112d68a123b5b4ed4b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.