Google Cloud Platform offers 300$ free credits to get you started. This is more than enough to run this project.
-
Create an account and project.
-
Authentication: This sample requires you to have authentication setup. Refer to the Authentication Getting Started Guide for instructions on setting up credentials for applications. In this tuto, I use a
json
service key that is passed to the container at runtime. -
Activate the Google Cloud Pub/Sub API, if you have not already done so. https://console.cloud.google.com/flows/enableapi?apiid=pubsub
-
Go to
Storage
and create a Google Cloud Storage bucket. You will store the different versions of your models in this bucket. You can also use thegsutil
CLI.
gsutil mb gs://ml_models
- Create a Cloud Pub/Sub topic and publish bucket notifications there:
gsutil notification create -f json -t model_topic gs://ml_models
- Create a subscription for your new topic:
gcloud beta pubsub subscriptions create model_subscription --topic=model_topic
You're done! You can know run the model_poller
docker image with the proper environment variable.
Note Those setup steps are inspired from the official Google Cloud Platform documentation. See original here.