Initialize portable humanoid RL framework with licenses, locks and CI
Core and layout checks / core (push) Has been cancelled
Core and layout checks / core (push) Has been cancelled
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
PY="${UH_PYTHON:-$ROOT/.venv/bin/python}"
|
||||
if [[ ! -x "$PY" ]]; then
|
||||
echo 'No test environment. Run uv sync --locked --extra dev; see docs/SETUP.md.' >&2
|
||||
exit 1
|
||||
fi
|
||||
unset PYTHONPATH
|
||||
export PYTHONNOUSERSITE=1
|
||||
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
cd "$ROOT"
|
||||
"$PY" -m ruff check src tests tools .agents/skills/*/scripts
|
||||
"$PY" -m ruff format --check src tests tools .agents/skills/*/scripts
|
||||
"$PY" -m pytest -q "$@"
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Installation, not PYTHONPATH ordering, selects the in-repository packages.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
if [[ -n "${MJLAB_ROOT:-}" || -n "${UH_EXTRA_PYTHONPATH:-}" ]]; then
|
||||
echo 'External backend/PYTHONPATH overrides are no longer supported. Install this repository; see docs/SETUP.md.' >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -n "${UH_PYTHON:-}" ]]; then
|
||||
PY="$UH_PYTHON"
|
||||
elif [[ -x "$ROOT/.venv/bin/python" ]]; then
|
||||
PY="$ROOT/.venv/bin/python"
|
||||
else
|
||||
PY="$(command -v python3 || true)"
|
||||
fi
|
||||
if [[ ! -x "$PY" ]]; then
|
||||
echo 'Invalid Python interpreter. Run uv sync --locked --extra dev, or set UH_PYTHON explicitly.' >&2
|
||||
exit 1
|
||||
fi
|
||||
# Exclude unrelated ROS/site configuration without injecting source directories.
|
||||
unset PYTHONPATH
|
||||
export PYTHONNOUSERSITE=1
|
||||
export MUJOCO_GL="${MUJOCO_GL:-egl}"
|
||||
export OMP_NUM_THREADS="${OMP_NUM_THREADS:-4}"
|
||||
exec "$PY" -m universal_humanoid "$@"
|
||||
Reference in New Issue
Block a user