Skip to content

Commit

Permalink
Merge pull request #4 from RIVM-bioinformatics/hotfix_mamba_install
Browse files Browse the repository at this point in the history
ops: fix mamba install
  • Loading branch information
boasvdp authored Jun 9, 2023
2 parents b1fe7b6 + 3d41bd9 commit d48ed69
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions run_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,38 @@ fi


#----------------------------------------------#
# Create/update necessary environments
MAIN_ENV_YAML="envs/juno_cgmlst.yaml"
MAIN_ENV=$(head -n 1 ${MAIN_ENV_YAML} | cut -f2 -d ' ')
## make sure conda works

echo -e "\nUpdating necessary environments to run the pipeline..."
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/mnt/miniconda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/mnt/miniconda/etc/profile.d/conda.sh" ]; then
. "/mnt/miniconda/etc/profile.d/conda.sh"
else
export PATH="/mnt/miniconda/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<export -f conda
export -f __conda_activate
export -f __conda_reactivate
export -f __conda_hashr

# Removing strict mode because it sometimes breaks the code for
# activating an environment and for testing whether some variables
# are set or not
set +euo pipefail

mamba env update -f "${MAIN_ENV_YAML}"
#----------------------------------------------#
# Create the environment

source activate "${MAIN_ENV}"
# we can use the base installation of mamba to create the environment.
# Swapping to a parent env is not necessary anymore.
mamba env create -f envs/master_env.yaml --name pipeline_env
conda activate pipeline_env

set -euo pipefail

#----------------------------------------------#
# Configure genus

if [ ! -z ${irods_runsheet_sys__runsheet__lsf_queue} ]; then
QUEUE="${irods_runsheet_sys__runsheet__lsf_queue}"
Expand Down

0 comments on commit d48ed69

Please sign in to comment.