From 54e2de6eb51c3ca08b3327f3f0be4b49b26f1ce9 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 10 Sep 2024 12:14:30 -0400 Subject: [PATCH] feat: use /data/USER for sing cache dir if available --- aspen | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aspen b/aspen index 62c010c..f2a908d 100755 --- a/aspen +++ b/aspen @@ -766,8 +766,14 @@ function main(){ # CLUSTERSTATUSCMD="${PIPELINE_HOME}/resources/cluster_status.sh" if [[ -z "$SING_CACHE_DIR" ]]; then - echo "singularity cache dir (--singcache) is not set, using ${WORKDIR}/.singularity" - SING_CACHE_DIR="${WORKDIR}/.singularity" + echo "singularity cache dir (--singcache) is not set" + if [[ -d "/data/$USER" ]]; then + SING_CACHE_DIR="/data/$USER/.singularity" + else + SING_CACHE_DIR="${WORKDIR}/.singularity" + fi + echo "\tusing ${SING_CACHE_DIR}" + mkdir -p $SING_CACHE_DIR fi EXPORT_SING_CACHE_DIR_CMD="export SINGULARITY_CACHEDIR=\"${SING_CACHE_DIR}\""