Skip to content
Snippets Groups Projects

Add SINGULARITY_BINDPATH at autodetection stage to avoid duplication.

Merged Sylvester Joosten requested to merge sly2j-master-patch-67057 into master
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -180,17 +180,17 @@ function install_linux() {
@@ -180,17 +180,17 @@ function install_linux() {
## is always bound. We also check for the existence of a few standard
## is always bound. We also check for the existence of a few standard
## locations (/scratch /volatile /cache) and bind those too if found
## locations (/scratch /volatile /cache) and bind those too if found
echo " - Determining additional bind paths"
echo " - Determining additional bind paths"
 
BINDPATH=${SINGULARITY_BINDPATH}
 
echo " --> system bindpath: $BINDPATH"
PREFIX_ROOT="/$(realpath $PREFIX | cut -d "/" -f2)"
PREFIX_ROOT="/$(realpath $PREFIX | cut -d "/" -f2)"
BINDPATH=$PREFIX_ROOT
for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02 $PREFIX_ROOT; do
echo " --> $PREFIX_ROOT"
for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02; do
## only add directories once
## only add directories once
if [[ ${BINDPATH} =~ $(basename $dir) ]]; then
if [[ ${BINDPATH} =~ $(basename $dir) ]]; then
continue
continue
fi
fi
if [ -d $dir ]; then
if [ -d $dir ]; then
echo " --> $dir"
echo " --> $dir"
BINDPATH="${BINDPATH},$dir"
BINDPATH=${dir}${BINDPATH:+,$BINDPATH}
fi
fi
done
done
@@ -279,7 +279,7 @@ if [ ! -z \${UPGRADE} ]; then
@@ -279,7 +279,7 @@ if [ ! -z \${UPGRADE} ]; then
fi
fi
export ATHENA_PREFIX=$PREFIX/local
export ATHENA_PREFIX=$PREFIX/local
export SINGULARITY_BINDPATH=$BINDPATH\${SINGULARITY_BINDPATH:+:\$SINGULARITY_BINDPATH}
export SINGULARITY_BINDPATH=$BINDPATH
$SINGULARITY exec $SIF eic-shell \$@
$SINGULARITY exec $SIF eic-shell \$@
EOF
EOF
Loading