1. Write App (Flask, TensorFlow)

  • The code to build, train, and save the model is in the test folder.
  • Implement the app in main.py

2. Setup Google Cloud

  • Create new project
  • Activate Cloud Run API and Cloud Build API

3. Install and init Google Cloud SDK

4. Dockerfile, requirements.txt, .dockerignore

5. Cloud build & deploy

gcloud builds submit --tag gcr.io/random-developments/index
gcloud run deploy --image gcr.io/random-developments/index --platform managed

Test

  • Test the code with test/test.py