From ed26a93cff839abd3aa739fa3ad57ccf84c44c46 Mon Sep 17 00:00:00 2001 From: Ravnoor Gill Date: Fri, 13 Dec 2024 14:50:00 -0500 Subject: [PATCH] feat(preproc): replace conda with mamba calls --- app/preprocess.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/preprocess.sh b/app/preprocess.sh index 5aa827e..50725da 100755 --- a/app/preprocess.sh +++ b/app/preprocess.sh @@ -25,19 +25,15 @@ OUTDIR=${BASEDIR}/${ID}/ # args.outdir = os.path.join(args.dir, args.id) PWD=$(dirname "$0") -conda=${CONDA_EXE} -eval "$(conda shell.bash hook)" -conda activate preprocess -# echo $CONDA_PREFIX +eval "$(micromamba shell hook --shell posix)" +micromamba activate if [ ${PREPROCESSING} -eq 1 ] && [ ${USE_GPU} -eq 0 ]; then - python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --preprocess + micromamba run -n preprocess python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --preprocess elif [ ${PREPROCESSING} -eq 0 ] && [ ${USE_GPU} -eq 1 ]; then - python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --use_gpu + micromamba run -n preprocess python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --use_gpu elif [ ${PREPROCESSING} -eq 1 ] && [ ${USE_GPU} -eq 1 ]; then - python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --preprocess --use_gpu + micromamba run -n preprocess python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} --preprocess --use_gpu else - python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} -fi - -conda deactivate \ No newline at end of file + micromamba run -n preprocess python3 $PWD/preprocess.py -i ${ID} -t1 ${T1_FNAME} -t2 ${T2_FNAME} -d ${BASEDIR} +fi \ No newline at end of file