Deploying Streamlit apps to Google App Engine in 5 simple steps.
This post will take you through how to take a python app built using the streamlit
package, dockerize it and deploy it to Google App Engine.
What you Need:
git — To clone the GitHub repository that contains a streamlit app which is ready to be deployed.
Docker — To bundle application code, requirements and configuration together into a Docker image.
Google Cloud SDK — To deploy the app onto GCP (You don’t need this if you are already working on a virtual machine on Google Cloud.) (Follow directions from the install page — after downloading and unzipping the files, run the install file using sh install.sh
if you are on a mac.)
Run docker --version
,git --version
and gcloud — version
in a terminal to make sure you have all software installed and working.
Note: You might be billed for using any services offered by Google, although the costs might be minimal, Please see pricing info before continuing.
Let’s get started:
1. Open up a terminal. Create a new directory git_repos
, clone the following repository that has a deployment ready streamlit app and change directory into the cloned folder. (You can see the demo app in action here.)