Setting Up Vertex AI Beginner
Before you can start training and deploying models on Vertex AI, you need to set up your Google Cloud environment. This lesson walks you through creating a GCP account, setting up a project, enabling the necessary APIs, and configuring Vertex AI Workbench.
Prerequisites
- A Google account (Gmail or Google Workspace)
- A credit card for GCP billing (Google offers $300 free credits for new users)
- Basic familiarity with the command line
Step 1: Create a GCP Account
-
Go to the Google Cloud Console
Visit console.cloud.google.com and sign in with your Google account.
-
Activate the free trial
New users receive $300 in free credits valid for 90 days. Click "Try Free" to activate your trial. You will need to provide billing information, but you won't be charged until you manually upgrade.
Step 2: Create a Project
Every resource in GCP belongs to a project. Create a dedicated project for your Vertex AI work:
# Using the gcloud CLI gcloud projects create my-vertex-ai-project --name="Vertex AI Project" gcloud config set project my-vertex-ai-project # Enable billing for the project gcloud billing accounts list gcloud billing projects link my-vertex-ai-project --billing-account=BILLING_ACCOUNT_ID
Step 3: Enable Vertex AI APIs
Enable the required APIs for Vertex AI:
# Enable Vertex AI API gcloud services enable aiplatform.googleapis.com # Enable additional useful APIs gcloud services enable compute.googleapis.com gcloud services enable storage.googleapis.com gcloud services enable notebooks.googleapis.com gcloud services enable containerregistry.googleapis.com
Step 4: Install the Google Cloud SDK
If you haven't already, install the Google Cloud SDK and the Vertex AI Python client:
# Install the Vertex AI Python SDK pip install google-cloud-aiplatform # Authenticate with your Google account gcloud auth application-default login # Set your default region gcloud config set compute/region us-central1
Step 5: Set Up Vertex AI Workbench
Vertex AI Workbench provides managed JupyterLab instances pre-configured with ML frameworks and the Vertex AI SDK:
-
Navigate to Vertex AI Workbench
In the Cloud Console, go to Vertex AI > Workbench.
-
Create a new instance
Click "Create New" and select "Instances." Choose a machine type (e.g., n1-standard-4 for general use) and optionally add a GPU.
-
Open JupyterLab
Once the instance is running, click "Open JupyterLab" to launch your development environment with all Vertex AI libraries pre-installed.
Step 6: Verify Your Setup
from google.cloud import aiplatform # Initialize the Vertex AI SDK aiplatform.init( project="my-vertex-ai-project", location="us-central1" ) # List existing models (should be empty initially) models = aiplatform.Model.list() print(f"Models in project: {len(models)}") print("Vertex AI setup complete!")
gcloud notebooks instances stop command to stop instances.
Setup Complete!
Your Vertex AI environment is ready. In the next lesson, you will learn how to train models using AutoML and custom training on Vertex AI.
Next: Training Models →
Lilly Tech Systems