From 89184e5119468c7b7b055595091fa86147dc0d45 Mon Sep 17 00:00:00 2001 From: Jeffrey Garretson Date: Tue, 14 Oct 2025 11:26:31 -0600 Subject: [PATCH] weekly dash not running locally due to conda --- testingScripts/weeklyDash-template.pbs | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/testingScripts/weeklyDash-template.pbs b/testingScripts/weeklyDash-template.pbs index a48589c0..d91382c2 100644 --- a/testingScripts/weeklyDash-template.pbs +++ b/testingScripts/weeklyDash-template.pbs @@ -20,19 +20,26 @@ echo 'The currently loaded modules are:' module list echo 'Loading python environment.' -mage_miniconda3="${HOME}/miniconda3" -mage_conda="${mage_miniconda3}/bin/conda" -__conda_setup="$($mage_conda 'shell.bash' 'hook' 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "$mage_miniconda3/etc/profile.d/conda.sh" ]; then - . "$mage_miniconda3/etc/profile.d/conda.sh" +mage_test_root=$HOME +if [ -d "${mage_test_root}/miniconda3" ]; then + echo 'Loading local miniconda3' + mage_miniconda3="${mage_test_root}/miniconda3" + mage_conda="${mage_miniconda3}/bin/conda" + __conda_setup="$($mage_conda 'shell.bash' 'hook' 2> /dev/null)" + if [ $? -eq 0 ]; then + eval "$__conda_setup" else - export PATH="$mage_miniconda3/bin:$PATH" + if [ -f "$mage_miniconda3/etc/profile.d/conda.sh" ]; then + . "$mage_miniconda3/etc/profile.d/conda.sh" + else + export PATH="$mage_miniconda3/bin:$PATH" + fi fi + unset __conda_setup +else + echo 'Loading conda module' + module load conda fi -unset __conda_setup conda activate {{ conda_environment }} echo "The current conda environment is ${CONDA_PREFIX}."