Photo by Bailey Alexander on Unsplash
Enable auto-shutdown for Vertex AI Workbench user-managed Notebooks
Vertex AI Workbench user-managed notebooks instances let you create and manage deep learning virtual machine (VM) instances that are prepackaged with JupyterLab. It is powerful but doesn't have an auto-shutdown feature. Is it possible to enable it without using Cloud Schedule and Cloud Function?
I found that, behind the scene, user-managed notebook instances are Google-prebuilt Compute Engine instances.
From the Vertex AI console:
From Compute Engine console, it is shown as a normal instance:
Since it is just a normal Compute Engine VM, I wonder if it can leverage the built-in INSTANCE SCHEDULES
feature.
During my lab, I set up my Compute Engine schedule looks like this:
From the logs, I can find that the instance was stopped:
Note that for some reason, there was a delay in scheduling the shutdown events. From the logs, it was roughly 14-15 minutes.
Anyway, it worked! Now you can rest assure that your Vertex AI Workbench user-managed notebooks won't cost money during the nights.