How To Deploy ML Models With Google Cloud Run

Learn how to deploy Machine Learning / Deep Learning models with Google Cloud Run. We build a simple app with TensorFlow and Flask, containerize it with Docker, and deploy it to Google Cloud Run.

You can find the code on GitHub: https://github.com/python-engineer/ml-deployment.

1. Write App (Flask, TensorFlow)

2. Setup Google Cloud

3. Install and init Google Cloud SDK

4. Dockerfile, requirements.txt, .dockerignore

5. Cloud build & deploy

gcloud builds submit --tag gcr.io/<project_id>/<function_name> gcloud run deploy --image gcr.io/<project_id>/<function_name> --platform managed

Test

FREE VS Code / PyCharm Extensions I Use

🪁 Code faster with Kite, AI-powered autocomplete: Link *

✅ Write cleaner code with Sourcery, instant refactoring suggestions: Link *

* These are affiliate links. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you! 🙏

Check out my Courses