Google Vertex AI/AutoML Vision Edge GPU Container Deployment with Docker-Compose & Health Check

In this tutorial, you will learn how to monitor the availability of Edge containers and perform automatic restarts when the node goes down.

We will use the curl command inside the Edge container to perform a prediction request to verify that the node is working properly. This is what the bash script looks like. You need to replace <test-image-in-base64> with your image data encoding in Base64. Do not forget to assign this file executable permission in the end.

The Edge container does not have the curl installed by default. So we create a Dockfile to do that. We run apt-get update with exit 0 to discard any errors of keys.

Next, we are going to build the docker-compose file, in which using willfarrell/autoheal to restart the potential unhealthy Edge container.

Then, we create a .dockerignore file to ignore exported weight files.

This is the structure overview of the working directory. The .gitignore has the same content as the .dockerignore to prevent uploading weight files to the git repository. Your weight files saved_model.pb should be in the same directory.

Finally, you can run docker-compose up command to start the predicting service as well as the monitoring service. To view the status of Edge container, use docker ps command.

Leave a Reply

Your email address will not be published. Required fields are marked *