From a02b5d5f1614ac04e41e6872907371e289828327 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sun, 5 Apr 2026 00:13:25 +0200 Subject: [PATCH] fix(hpc): disk quota --- scripts/hpc/install.sh | 4 ++++ scripts/hpc/train.pbs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/scripts/hpc/install.sh b/scripts/hpc/install.sh index 737f259..541af16 100644 --- a/scripts/hpc/install.sh +++ b/scripts/hpc/install.sh @@ -34,11 +34,15 @@ mkdir -p "$PIP_CACHE_DIR" "$UV_CACHE_DIR" module load vsc-venv echo ">>> Synchronizing and activating environment (vsc-venv)..." +# cd to $VSC_DATA so vsc-venv creates its venvs/ directory there, not in $HOME. +mkdir -p "$VSC_DATA/$PROJ_NAME" +cd "$VSC_DATA/$PROJ_NAME" set +euo pipefail source vsc-venv --activate \ --modules "$HPC_CONFIG_DIR/modules.txt" \ --requirements "$HPC_CONFIG_DIR/requirements.txt" set -euo pipefail +cd "$PBS_O_WORKDIR" # Prepend venv to PYTHONPATH to shadow system packages (e.g. SciPy-bundle compiled # against NumPy 1.x) that are injected by the loaded modules. diff --git a/scripts/hpc/train.pbs b/scripts/hpc/train.pbs index fae4065..1610920 100644 --- a/scripts/hpc/train.pbs +++ b/scripts/hpc/train.pbs @@ -41,11 +41,14 @@ if [ ! -d "$HPC_CONFIG_DIR" ]; then exit 1 fi +# cd to $VSC_DATA so vsc-venv finds its venvs/ directory there, not in $HOME. +cd "$VSC_DATA/$PROJ_NAME" set +euo pipefail source vsc-venv --activate \ --modules "$HPC_CONFIG_DIR/modules.txt" \ --requirements "$HPC_CONFIG_DIR/requirements.txt" set -euo pipefail +cd "$PBS_O_WORKDIR" # Prepend venv to PYTHONPATH to shadow system packages (e.g. SciPy-bundle compiled # against NumPy 1.x) that are injected by the loaded modules.