Skip to content
Snippets Groups Projects
Commit 245792a6 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Add SINGULARITY_BINDPATH at autodetection stage to avoid duplication.

parent 70e2ac5f
No related branches found
No related tags found
1 merge request!174Add SINGULARITY_BINDPATH at autodetection stage to avoid duplication.
......@@ -180,17 +180,17 @@ function install_linux() {
## is always bound. We also check for the existence of a few standard
## locations (/scratch /volatile /cache) and bind those too if found
echo " - Determining additional bind paths"
BINDPATH=${SINGULARITY_BINDPATH}
echo " --> system bindpath: $BINDPATH"
PREFIX_ROOT="/$(realpath $PREFIX | cut -d "/" -f2)"
BINDPATH=$PREFIX_ROOT
echo " --> $PREFIX_ROOT"
for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02; do
for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02 $PREFIX_ROOT; do
## only add directories once
if [[ ${BINDPATH} =~ $(basename $dir) ]]; then
continue
fi
if [ -d $dir ]; then
echo " --> $dir"
BINDPATH="${BINDPATH},$dir"
BINDPATH=${dir}${BINDPATH:+,$BINDPATH}
fi
done
......@@ -279,7 +279,7 @@ if [ ! -z \${UPGRADE} ]; then
fi
export ATHENA_PREFIX=$PREFIX/local
export SINGULARITY_BINDPATH=$BINDPATH\${SINGULARITY_BINDPATH:+:\$SINGULARITY_BINDPATH}
export SINGULARITY_BINDPATH=$BINDPATH
$SINGULARITY exec $SIF eic-shell \$@
EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment