RS-DAT / JupyterDaskOnSLURM

Apache License 2.0
16 stars 3 forks source link

Add to documentation: Load module with container wrapper solution #80

Open rogerkuou opened 4 months ago

rogerkuou commented 4 months ago

When working with the following module loading script in a Jupyter Notebook in Apptainer

! source ~/init.sh
! module load gmtsar/6.5
! module list

where in init.sh

#!/bin/bash

# TODO Put this where it belongs
# See: https://tudelft-caroline.atlassian.net/browse/CAR-73 
export UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE

if ! echo $MODULEPATH | tr : '\n' | grep -qiF '/project/caroline/Software/modulefiles'; then
if [ -z "${MODULEPATH}" ]; then
export MODULEPATH='/project/caroline/Software/modulefiles'
else
export MODULEPATH="${MODULEPATH}:/project/caroline/Software/modulefiles"
fi
fi

This works in a normal conda env but not in Apptainer. By adding the source and load command in the Slurm job script, the module can be loaded normally.

We should add this as a trouble shooting section in the documentation.