Skip to content

Instantly share code, notes, and snippets.

@fsmanuel
Last active March 31, 2019 18:40
Show Gist options
  • Save fsmanuel/e5252aab0bd7e7584a5b99c71a772c8a to your computer and use it in GitHub Desktop.
Save fsmanuel/e5252aab0bd7e7584a5b99c71a772c8a to your computer and use it in GitHub Desktop.
Simple Python deployments with Miniconda
# 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
# 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