Download verify_runtime.sh from nerako/simplevla-grpo-runtime-fallback: direct link, hf CLI and curl.
- Browser
- Download file 4.89 kB
-
https://huggingface.co/datasets/nerako/simplevla-grpo-runtime-fallback/resolve/main/verify_runtime.sh
- Command line
-
hf download hf://datasets/nerako/simplevla-grpo-runtime-fallback/verify_runtime.sh
-
curl -L -o verify_runtime.sh https://huggingface.co/datasets/nerako/simplevla-grpo-runtime-fallback/resolve/main/verify_runtime.sh
4.89 kB
| # Verify Docker or native fallback runtime without starting a full training run. | |
| set -euo pipefail | |
| TARGET_ROOT="${TARGET_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" | |
| DATA_ROOT="${DATA_ROOT:-/data4/nerako/reasoning}" | |
| VERIFY_ISAAC="${VERIFY_ISAAC:-0}" | |
| VERIFY_ASSET_JSON="${VERIFY_ASSET_JSON:-${TARGET_ROOT}/env_file/objaverse_success_256.json}" | |
| VERIFY_CHECKPOINT="${VERIFY_CHECKPOINT:-${DATA_ROOT}/openpi_checkpoints/pi05_droid_jointpos_pytorch_new}" | |
| SIMPLEVLA_PYTHON="${SIMPLEVLA_PYTHON:-python}" | |
| fail() { | |
| echo "[verify] FAIL: $*" >&2 | |
| exit 1 | |
| } | |
| check_path() { | |
| local path="$1" | |
| [[ -e "${path}" ]] || fail "missing path: ${path}" | |
| echo "[verify] ok path: ${path}" | |
| } | |
| activate_if_available() { | |
| if [[ -f "${TARGET_ROOT}/activate_simplevla_runtime.sh" ]]; then | |
| # shellcheck disable=SC1090 | |
| source "${TARGET_ROOT}/activate_simplevla_runtime.sh" | |
| SIMPLEVLA_PYTHON="${SIMPLEVLA_PYTHON:-python}" | |
| return | |
| fi | |
| if [[ -f "${TARGET_ROOT}/RLinf/venv_isaaclab/bin/activate" ]]; then | |
| # shellcheck disable=SC1091 | |
| source "${TARGET_ROOT}/RLinf/venv_isaaclab/bin/activate" | |
| SIMPLEVLA_PYTHON="${TARGET_ROOT}/RLinf/venv_isaaclab/bin/python" | |
| fi | |
| local rlinf_dir="${TARGET_ROOT}/RLinf" | |
| local venv_site="${rlinf_dir}/venv_isaaclab/lib/python3.11/site-packages" | |
| export PYTHONPATH="${rlinf_dir}:${venv_site}:${PYTHONPATH:-}" | |
| export LD_LIBRARY_PATH="${venv_site}/torch/lib:${LD_LIBRARY_PATH:-}" | |
| export EMBODIED_PATH="${rlinf_dir}/examples/embodiment" | |
| export VK_ICD_FILENAMES="${VK_ICD_FILENAMES:-/usr/share/vulkan/icd.d/nvidia_icd.json}" | |
| export VK_DRIVER_FILES="${VK_DRIVER_FILES:-/usr/share/vulkan/icd.d/nvidia_icd.json}" | |
| export PYTORCH_CUDA_ALLOC_CONF="${PYTORCH_CUDA_ALLOC_CONF:-expandable_segments:True}" | |
| } | |
| main() { | |
| check_path "${TARGET_ROOT}" | |
| check_path "${TARGET_ROOT}/RLinf" | |
| check_path "${VERIFY_ASSET_JSON}" | |
| check_path "${VERIFY_CHECKPOINT}" | |
| check_path "${VERIFY_CHECKPOINT}/assets/droid/norm_stats.json" | |
| command -v nvidia-smi >/dev/null 2>&1 || fail "nvidia-smi not found" | |
| nvidia-smi --query-gpu=index,name,memory.total,driver_version --format=csv,noheader | |
| activate_if_available | |
| "${SIMPLEVLA_PYTHON}" - <<'PY' | |
| import importlib.util | |
| import os | |
| required = ["torch", "ray", "hydra", "omegaconf", "rlinf"] | |
| optional = ["openpi", "isaaclab"] | |
| missing = [] | |
| for name in required + optional: | |
| spec = importlib.util.find_spec(name) | |
| print(f"[verify] module {name}: {'FOUND' if spec else 'MISSING'} {spec.origin if spec else ''}") | |
| if name in required and spec is None: | |
| missing.append(name) | |
| if missing: | |
| raise SystemExit(f"missing required modules: {missing}") | |
| import torch | |
| print("[verify] torch:", torch.__version__) | |
| print("[verify] cuda_available:", torch.cuda.is_available()) | |
| print("[verify] cuda_device_count:", torch.cuda.device_count()) | |
| if not torch.cuda.is_available(): | |
| raise SystemExit("torch CUDA is not available") | |
| print("[verify] PYTHONPATH:", os.environ.get("PYTHONPATH", "")[:500]) | |
| PY | |
| VERIFY_ASSET_JSON="${VERIFY_ASSET_JSON}" "${SIMPLEVLA_PYTHON}" - <<'PY' | |
| import json | |
| import os | |
| from pathlib import Path | |
| path = Path(os.environ["VERIFY_ASSET_JSON"]) | |
| data = json.loads(path.read_text()) | |
| paths = [] | |
| def walk(obj): | |
| if isinstance(obj, dict): | |
| for k, v in obj.items(): | |
| if k in {"usd_path", "path", "asset_path"} and isinstance(v, str): | |
| if v.endswith((".usd", ".usda", ".usdc", ".usdz")): | |
| paths.append(v) | |
| walk(v) | |
| elif isinstance(obj, list): | |
| for v in obj: | |
| walk(v) | |
| walk(data) | |
| missing = [p for p in paths if not Path(p).exists()] | |
| print(f"[verify] asset json USD paths: {len(paths)} checked, missing={len(missing)}") | |
| if missing: | |
| for p in missing[:20]: | |
| print("[verify] missing:", p) | |
| raise SystemExit("asset json contains missing USD paths") | |
| PY | |
| TARGET_ROOT="${TARGET_ROOT}" "${SIMPLEVLA_PYTHON}" - <<'PY' | |
| import os | |
| from pathlib import Path | |
| from hydra import compose, initialize_config_dir | |
| root = Path(os.environ["TARGET_ROOT"]) | |
| config_dir = root / "RLinf/examples/embodiment/config" | |
| with initialize_config_dir(config_dir=str(config_dir), version_base=None): | |
| cfg = compose(config_name="simpleVLA_pi05") | |
| print("[verify] hydra compose simpleVLA_pi05 ok") | |
| print("[verify] actor model:", cfg.actor.model.model_type) | |
| print("[verify] total envs:", cfg.env.train.total_num_envs) | |
| PY | |
| if [[ "${VERIFY_ISAAC}" == "1" ]]; then | |
| echo "[verify] running Isaac headless startup test" | |
| timeout "${VERIFY_ISAAC_TIMEOUT:-180}" "${SIMPLEVLA_PYTHON}" - <<'PY' | |
| from isaaclab.app import AppLauncher | |
| launcher = AppLauncher(headless=True) | |
| app = launcher.app | |
| print("[verify] Isaac AppLauncher headless startup ok") | |
| app.close() | |
| PY | |
| else | |
| echo "[verify] VERIFY_ISAAC=0; skipping heavy Isaac headless startup" | |
| fi | |
| echo "[verify] runtime verification passed" | |
| } | |
| main "$@" | |