Skip to content

Commit

Permalink
Exit install script if environment creation failed to avoid errouneou…
Browse files Browse the repository at this point in the history
…sly installing packages into the base env.
  • Loading branch information
radekd91 committed Feb 13, 2023
1 parent c167b94 commit 2d5ff79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions install_38.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ echo "Creating conda environment"
mamba create -n work38 python=3.8
eval "$(conda shell.bash hook)" # make sure conda works in the shell script
conda activate work38
if echo $CONDA_PREFIX | grep work38
then
echo "Conda environment successfully activated"
else
echo "Conda environment not activated. Probably it was not created successfully for some reason. Please activate the conda environment before running this script"
exit
fi
echo "Installing conda packages"
mamba env update -n work38 --file conda-environment_py38_cu11_ubuntu.yml
echo "Installing GDL"
Expand Down

0 comments on commit 2d5ff79

Please sign in to comment.