1
Fork 0

fix(hpc): hardening

This commit is contained in:
Tibo De Peuter 2026-04-04 22:48:16 +02:00
parent 15319890a6
commit 520d429bac
2 changed files with 34 additions and 21 deletions

View file

@ -1,23 +1,24 @@
#!/bin/bash
#!/bin/bash -l
# scripts/hpc/install.sh
#
# Usage (on any compute node):
# bash scripts/hpc/install.sh
set -eo pipefail
echo ">>> Starting HPC Installation in $(hostname)..."
# Mirror configs to $VSC_DATA to avoid home quota limits (3GB)
# vsc-venv manages environments relative to the requirements file
HPC_CONFIG_DIR="$VSC_DATA/2026SEL3-project/env/hpc"
PROJ_NAME=$(basename "$PWD")
HPC_CONFIG_DIR="$VSC_DATA/$PROJ_NAME/env/hpc"
mkdir -p "$HPC_CONFIG_DIR"
cp env/hpc/*.txt "$HPC_CONFIG_DIR/"
module load vsc-venv
echo ">>> Synchronizing and activating environment (vsc-venv)..."
set +eo pipefail
source vsc-venv --activate \
--modules "$HPC_CONFIG_DIR/modules.txt" \
--requirements "$HPC_CONFIG_DIR/requirements.txt"
set -eo pipefail
# Overlay specific NumPy/Protobuf versions to ensure venv precedence
echo ">>> Applying library overlays (NumPy, Protobuf)..."