Last active
March 31, 2019 18:40
-
-
Save fsmanuel/e5252aab0bd7e7584a5b99c71a772c8a to your computer and use it in GitHub Desktop.
Simple Python deployments with Miniconda
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
# One time setup | |
# Install Miniconda | |
wget -O src/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash src/miniconda.sh -b -p $HOME/miniconda | |
export PATH="$HOME/miniconda/bin:$PATH" | |
# Get the source | |
git clone https://github.com/datasciencejob-de/data-science-python-setup.git . | |
# Create the environment | |
conda env create -f environment.yml |
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
# Deployment that needs to run on every deploy | |
export PATH="$HOME/miniconda/bin:$PATH" | |
# Checkout the new source | |
git reset --hard | |
git fetch origin | |
git checkout --force origin/master | |
# Update the environment | |
conda env update -f environment.yml | |
# Activate the environment | |
. activate data-science-project | |
# Run your app | |
# python main.py # and boom goes the dynamite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment