Created
February 25, 2022 09:44
-
-
Save iiey/fb93df3f4d8409c8838bdcc21976708c to your computer and use it in GitHub Desktop.
start notebook inside conda env (here named: jupyter)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# conda is not in PATH manually specify installed directory | |
CONDADIR="$HOME/miniconda3" | |
# >>> conda initialize >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$('$CONDADIR/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "$CONDADIR/etc/profile.d/conda.sh" ]; then | |
. "$CONDADIR/etc/profile.d/conda.sh" | |
else | |
export PATH="$CONDADIR/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
# <<< conda initialize <<< | |
# enter env, start notebook and exit env after complete | |
conda activate jupyter | |
jupyter "${@}" | |
conda deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment