From 7e902aa8b603f89757d0893eb9754196ebecdca7 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 4 Apr 2026 23:20:12 +0200 Subject: [PATCH] fixup! fix(hpc): numpy --- env/hpc/requirements.txt | 1 + scripts/hpc/install.sh | 4 ---- scripts/hpc/train.pbs | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/env/hpc/requirements.txt b/env/hpc/requirements.txt index 9927f3d..5cdc7f1 100644 --- a/env/hpc/requirements.txt +++ b/env/hpc/requirements.txt @@ -6,6 +6,7 @@ gymnasium>=1.2.3 ipykernel==7.2.0 jax==0.9.0.1 numpy>=2.0.0 +scipy>=1.14.0 protobuf>=5.0.0 warp-lang mujoco-warp diff --git a/scripts/hpc/install.sh b/scripts/hpc/install.sh index 6a50646..5e45c64 100644 --- a/scripts/hpc/install.sh +++ b/scripts/hpc/install.sh @@ -39,10 +39,6 @@ set -euo pipefail VENV_LIB_DIR="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')/site-packages" export PYTHONPATH="$VENV_LIB_DIR:$PYTHONPATH" -# Overlay modern NumPy/Protobuf versions -echo ">>> Applying library overlays (NumPy, Protobuf)..." -pip install --upgrade --no-deps numpy protobuf - echo '>>> Installing ipykernel...' CLUSTER_ID="${VSC_INSTITUTE_CLUSTER:-generic}" python -m ipykernel install --user --name="sel3_${CLUSTER_ID}" \ diff --git a/scripts/hpc/train.pbs b/scripts/hpc/train.pbs index 53d37c3..9a3a3ac 100644 --- a/scripts/hpc/train.pbs +++ b/scripts/hpc/train.pbs @@ -47,8 +47,8 @@ source vsc-venv --activate \ --requirements "$HPC_CONFIG_DIR/requirements.txt" set -euo pipefail -# Force the venv path to the front of PYTHONPATH to override system modules (e.g. NumPy 1.2x) -# This is required because VSC system modules are appended to PYTHONPATH and would otherwise shadow your venv +# Force the venv path to the front of PYTHONPATH so venv packages take priority +# over system module packages (e.g. SciPy-bundle) that may be injected by loaded modules. VENV_LIB_DIR="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')/site-packages" export PYTHONPATH="$VENV_LIB_DIR:$PYTHONPATH"