diff --git a/env/hpc/requirements.txt b/env/hpc/requirements.txt index 9927f3d..20a1fe1 100644 --- a/env/hpc/requirements.txt +++ b/env/hpc/requirements.txt @@ -4,7 +4,8 @@ evosax==0.2.0 flax>=0.12.2 gymnasium>=1.2.3 ipykernel==7.2.0 -jax==0.9.0.1 +jax[cuda13]==0.9.0.1 +scipy>=1.14.0 numpy>=2.0.0 protobuf>=5.0.0 warp-lang diff --git a/scripts/hpc/install.sh b/scripts/hpc/install.sh index 5e45c64..4e428fa 100644 --- a/scripts/hpc/install.sh +++ b/scripts/hpc/install.sh @@ -35,9 +35,10 @@ 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) +# Prepend venv to PYTHONPATH to shadow system packages (e.g. SciPy-bundle compiled +# against NumPy 1.x) that are injected by the 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" +export PYTHONPATH="$VENV_LIB_DIR:${PYTHONPATH:-}" echo '>>> Installing ipykernel...' CLUSTER_ID="${VSC_INSTITUTE_CLUSTER:-generic}" diff --git a/scripts/hpc/train.pbs b/scripts/hpc/train.pbs index 9a3a3ac..fae4065 100644 --- a/scripts/hpc/train.pbs +++ b/scripts/hpc/train.pbs @@ -47,10 +47,11 @@ source vsc-venv --activate \ --requirements "$HPC_CONFIG_DIR/requirements.txt" set -euo pipefail -# 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. +# Prepend venv to PYTHONPATH to shadow system packages (e.g. SciPy-bundle compiled +# against NumPy 1.x) that are injected by the 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" +export PYTHONPATH="$VENV_LIB_DIR:${PYTHONPATH:-}" + echo ">>> Starting BrittleStar training..." export MUJOCO_GL=egl