File indexing completed on 2024-04-06 12:31:47
0001
0002
0003
0004
0005
0006
0007 if type apptainer >& /dev/null; then
0008 echo "has apptainer"
0009 CONTAINER_CONFIG="/etc/apptainer/apptainer.conf"
0010 else
0011 echo "missing apptainer, checking for singularity..."
0012 if type singularity >& /dev/null; then
0013 echo "has singularity"
0014 CONTAINER_CONFIG="/etc/singularity/singularity.conf"
0015 else
0016 echo "missing singularity also" && exit 1
0017 fi
0018 fi
0019
0020 if [ -n "$SINGULARITY_CONTAINER" ]; then
0021 if grep -q "^allow setuid = no" $CONTAINER_CONFIG && unshare -U echo >/dev/null 2>&1; then
0022 echo "has unprivileged user namespace support"
0023 else
0024 echo "missing unprivileged user namespace support" && exit 1
0025 fi
0026 fi