niaid / image_portal_workflows

Workflows related to project previously referred to as "Hedwig"
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

avoid using `/tmp` on compute #371

Open philipmac opened 11 months ago

philipmac commented 11 months ago

for each compute env (dev/qa/prod) we should change default TMPDIR justification - public /tmp gets full, is not reliable.

something simple like:

if [[ -O /home/$USER/tmp && -d /home/$USER/tmp ]]; then
        TMPDIR=/home/$USER/tmp
else
        # You may wish to remove this line, it is there in case
        # a user has put a file 'tmp' in there directory or a
        rm -rf /home/$USER/tmp 2> /dev/null
        mkdir -p /home/$USER/tmp
        TMPDIR=$(mktemp -d /home/$USER/tmp/XXXX)
fi

TMP=$TMPDIR
TEMP=$TMPDIR

export TMPDIR TMP TEMP

would avoid these kinds of errors

https://serverfault.com/questions/72955/how-to-change-default-tmp-to-home-user-tmp

philipmac commented 11 months ago

consider using SlurmCluster(job_script_prologue)