#!/usr/bin/env bash log(){ echo "[$(date +%H:%M:%S)] $*"; } cd /root/autodl-tmp/graph-as-policy export PATH=/root/miniconda3/bin:$PATH unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple source /root/.gap_env export UV_CACHE_DIR=/root/autodl-tmp/uvcache source /etc/network_turbo 2>/dev/null export HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 MUJOCO_GL=egl PYOPENGL_PLATFORM=egl export CUDA_VISIBLE_DEVICES=0 GAP_MUJOCO_EGL_DEVICES=0 for i in 0 1 2 3; do until [ $(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -i 0) -lt 3000 ]; do log "waiting GPU0 to clear..."; sleep 30; done log "=== GATE BATCH $i start ===" uv run gap benchmark examples/benchmark/gate_batch$i.yaml --gate --output-dir outputs/gate_b$i 2>&1 | tail -15 log "=== GATE BATCH $i exit=${PIPESTATUS[0]} ===" done log "GATE_ALL_DONE"