Train and deploy XGBoost models on Google Cloud C4A Axion VM
Introduction
Understand XGBoost and Google Axion C4A for machine learning
Create Google Cloud firewall rules for XGBoost
Create a Google Axion C4A virtual machine for XGBoost
Install XGBoost and train machine learning models
Deploy and access an XGBoost inference API
Next Steps
Train and deploy XGBoost models on Google Cloud C4A Axion VM
Set up the virtual machine
Create a Google Axion C4A Arm-based virtual machine (VM) on Google Cloud Platform. For this Learning Path, you’ll use the c4a-standard-4 machine type. c4a-standard-4provides 4 vCPUs and 16 GB of memory.
The VM that you’ll create will host XGBoost model training, hyperparameter tuning, benchmarking, and the inference API.
For help with Google Cloud Platform setup, see the Learning Path Getting started with Google Cloud Platform .
To create a C4A VM in the Google Cloud console:
- Navigate to the Google Cloud console .
- Go to Compute Engine > VM Instances and select Create Instance.
- Under Machine configuration, populate fields such as Instance name, Region, and Zone.
- Set Series to
C4A, then selectc4a-standard-4for Machine type.
Selecting machine type as C4A in the Google Cloud console
- Under OS and storage, select Change and then choose an Arm64-based operating system image. For this Learning Path, select SUSE Linux Enterprise Server.
- For the license type, choose Pay as you go.
- Increase Size (GB) from 10 to 100 to allocate sufficient disk space, and then select Choose.
- Expand Advanced options and select Networking.
- Under Network tags, enter
allow-xgboost-8080to link the VM to the firewall rule used for external API access and browser connectivity. - Select Create to launch the virtual machine.
After the instance starts, select SSH next to the VM in the instance list to open a browser-based terminal session.
Connecting to a running C4A VM using SSH
A new browser window opens with a terminal connected to your VM.
Terminal session connected to the VM
What you’ve accomplished and what’s next
You’ve now provisioned a Google Axion C4A Arm VM and connected to it using SSH. The VM is linked to the firewall rule that allows access to port 8080 for the XGBoost inference API.
Next, you’ll install XGBoost and configure a Python 3.11 environment for model training and benchmarking.