From 51da258feb52aaf93ac5b8c0dbdee3d9e864119e Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sat, 4 Apr 2026 21:40:07 +0200 Subject: [PATCH] refactor(hpc): more verbose --- scripts/hpc/install.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/hpc/install.sh b/scripts/hpc/install.sh index c1f2f22..dea8083 100644 --- a/scripts/hpc/install.sh +++ b/scripts/hpc/install.sh @@ -14,14 +14,27 @@ export PIP_CACHE_DIR="$VSC_SCRATCH/.cache/pip" export UV_CACHE_DIR="$VSC_SCRATCH/.cache/uv" mkdir -p "$PIP_CACHE_DIR" "$UV_CACHE_DIR" +# Ensure we are in the project root +if [ -n "$PBS_O_WORKDIR" ]; then + cd "$PBS_O_WORKDIR" +fi + module load vsc-venv -echo 'Installing venv...' +echo 'Synchronizing environment...' +# Step 1: Sync (build/update) the environment +vsc-venv \ + --modules env/hpc/modules.txt \ + --requirements env/hpc/requirements.txt + +echo 'Activating environment...' +# Step 2: Activate the environment source vsc-venv --activate \ --modules env/hpc/modules.txt \ --requirements env/hpc/requirements.txt -# Force upgrade shared system dependencies to ensure venv precedence +# Step 3: Force upgrade shared system dependencies to ensure venv precedence +echo 'Applying library overlays (NumPy, Protobuf)...' pip install --upgrade --no-deps numpy protobuf echo 'Installing ipykernel...'