Last active
October 7, 2019 15:30
-
-
Save bryant1410/d8689bdc8c8d82306b7897bce86f32dd to your computer and use it in GitHub Desktop.
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 | |
set -e | |
if [[ $# -eq 0 ]]; then | |
echo "Illegal number of arguments. Usage: ${0} env_name_or_prefix [args]..." | |
exit 2 | |
fi | |
name=$1 | |
shift | |
PATH=$HOME/miniconda3/condabin:$PATH # or like `module load python3.6-anaconda` | |
eval "$(conda shell.bash hook)" | |
conda activate "${name}" | |
python "$@" |
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 | |
name=$(echo $0 | cut -d '-' -f 2) | |
$HOME/conda-python ${name} "$@" # or from another directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment