#!/bin/bash -l
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=16
#SBATCH --time=01:00:00
#SBATCH --account=plgmrt4llm-gpu-a100
#SBATCH --partition=plgrid-gpu-a100
#SBATCH --output=logs/slurm_%x-%j.out

set -eo pipefail

module load CUDA/12.8.0
module load GCCcore/14.3.0 
module load Python/3.13.5

if [ ! -d ".venv-a100" ]; then
    python -m venv .venv-a100
fi
source .venv-a100/bin/activate

export CFLAGS="${CFLAGS} -fno-lto"
export CXXFLAGS="${CXXFLAGS} -fno-lto"

pip install --upgrade pip
pip install -r requirements.txt