Last active
March 30, 2020 20:48
-
-
Save lijunzh/869caa5b8e55c7e2144a2504382f8aae to your computer and use it in GitHub Desktop.
Bash script that setup standard conda environment for scientific conputing from scratch.
This file contains 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
#!/bin/bash | |
INSTALL_DIR=${HOME}/conda | |
INSTALL_SH='conda.sh' | |
# determin OS | |
OS=$(uname -s) | |
CONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-${OS/Darwin/MacOSX}-$(uname -m).sh" | |
# download installation file | |
wget ${CONDA_URL} -O ${INSTALL_SH} | |
# install via bash | |
bash ${INSTALL_SH} -b -p ${INSTALL_DIR} | |
# activate conda base env | |
source ${INSTALL_DIR}/bin/activate | |
conda init | |
# update conda env | |
conda update --yes conda | |
# clean install script | |
rm ${INSTALL_SH} | |
conda clean --all --yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script is updated to accomendate new Miniconda url and new conda API.