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

Add SINGULARITY_BINDPATH at autodetection stage to avoid duplication.

(cherry picked from commit 245792a6)
parent ee5cf7f8
Branches
No related tags found
1 merge request!201Add awkward-array package
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment