diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_index.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_index.md new file mode 100644 index 0000000000..b46c5508f9 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_index.md @@ -0,0 +1,72 @@ +--- +title: Train and deploy XGBoost models on Google Cloud C4A Axion VM + +draft: true +cascade: + draft: true + +description: Set up XGBoost on Google Cloud C4A Axion Arm VMs running SUSE Linux to train machine learning models, tune model performance, benchmark large-scale datasets, and deploy trained models as REST APIs. + +minutes_to_complete: 30 + +who_is_this_for: This is an introductory topic for DevOps engineers, ML engineers, data engineers, and software developers who want to train and deploy XGBoost machine learning models on SUSE Linux Enterprise Server (SLES) Arm64, optimize model performance, benchmark training workloads, and expose models through scalable inference APIs. + +learning_objectives: + - Install and configure XGBoost on Google Cloud C4A Axion processors for Arm64 + - Train and evaluate machine learning models using XGBoost + - Tune model hyperparameters and benchmark large-scale datasets + - Deploy trained XGBoost models as REST APIs and validate inference workflows + +prerequisites: + - A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled + - Basic familiarity with Python and machine learning concepts + +author: Pareena Verma + +##### Tags +skilllevels: Introductory +subjects: ML +cloud_service_providers: + - Google Cloud + +armips: + - Neoverse + +tools_software_languages: + - XGBoost + - Python + - scikit-learn + - Flask + +operatingsystems: + - Linux + +# ================================================================================ +# FIXED, DO NOT MODIFY +# ================================================================================ + +further_reading: + - resource: + title: XGBoost official documentation + link: https://xgboost.readthedocs.io/en/stable/ + type: documentation + + - resource: + title: XGBoost GitHub repository + link: https://github.com/dmlc/xgboost + type: documentation + + - resource: + title: Scikit-learn documentation + link: https://scikit-learn.org/stable/ + type: documentation + + - resource: + title: Flask documentation + link: https://flask.palletsprojects.com/ + type: documentation + +weight: 1 +layout: "learningpathall" +learning_path_main_page: yes +--- diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/background.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/background.md new file mode 100644 index 0000000000..08c1fce4f8 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/background.md @@ -0,0 +1,49 @@ +--- +title: Learn about XGBoost and Google Axion C4A for machine learning +weight: 2 + +layout: "learningpathall" +--- + +## Google Axion C4A Arm instances for machine learning + +Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications. + +The C4A series provides a cost-effective alternative to x86 virtual machines while using the scalability and performance benefits of the Arm architecture in Google Cloud. + +To learn more, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu). + +## XGBoost for scalable machine learning on Arm + +XGBoost (Extreme Gradient Boosting) is a high-performance machine learning library designed for supervised learning tasks such as classification, regression, and ranking. It's widely used for tabular machine learning workloads because of its speed, scalability, and strong predictive accuracy. + +XGBoost provides features such as: + +* Parallelized tree boosting for fast model training +* Built-in regularization to reduce overfitting +* Hyperparameter tuning support for performance optimization +* Efficient handling of large-scale datasets +* Optimized CPU execution for multi-core systems +* Model export and deployment for inference workloads + +Running XGBoost on Google Axion C4A Arm-based infrastructure enables efficient execution of machine learning workloads by using the high core-count architecture and optimized memory bandwidth available on Arm processors. This helps improve performance-per-watt, reduce infrastructure costs, and scale machine learning pipelines efficiently. + +Common use cases include: + +* Fraud detection +* Recommendation systems +* Customer churn prediction +* Financial forecasting +* Classification and regression workloads +* Large-scale tabular data training +* Real-time inference APIs + +XGBoost integrates easily with Python machine learning ecosystems such as Scikit-learn, NumPy, and Pandas, making it suitable for both experimentation and production deployment workflows. + +To learn more, see the [XGBoost documentation](https://xgboost.readthedocs.io/en/stable/) and the [XGBoost GitHub repository](https://github.com/dmlc/xgboost). + +## What you've learned and what's next + +You've now learned about Google Axion C4A Arm-based virtual machines and their performance advantages for machine learning workloads. You were also introduced to XGBoost and its capabilities for scalable training, hyperparameter tuning, and high-performance inference on Arm processors. + +Next, you'll install XGBoost and configure a Python 3.11 environment on a GCP Axion Arm64 VM for model training and benchmarking. diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/deploy-xgboost-inference-api.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/deploy-xgboost-inference-api.md new file mode 100644 index 0000000000..77861690be --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/deploy-xgboost-inference-api.md @@ -0,0 +1,196 @@ +--- +title: Deploy and access XGBoost inference API +weight: 8 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Deploy XGBoost inference API on SUSE Linux + +In this section, you'll deploy the trained XGBoost model as a Flask-based inference API on a GCP Axion Arm64 VM. You'll expose the API externally and access it from a browser using the VM public IP. + +You'll use: + +**Terminal A** → API server + +**Terminal B** → API testing + +## Connect to the VM +Connect to the VM where the trained XGBoost model and Python environment were created. This VM will host the inference API service. + +```bash +ssh @ +``` + +Navigate to the XGBoost project directory that contains the trained model files and scripts. + +```bash +cd ~/xgboost-learning-path +``` + +Activate the Python virtual environment to load all required Python packages and dependencies. + +```bash +source xgb-env/bin/activate +``` + +## Install Flask +Flask is used to create the lightweight REST API that serves XGBoost predictions through HTTP requests. + +Create an updated requirements file containing all required Python dependencies. + +```bash +cat > requirements.txt <<'EOF' +xgboost +numpy +pandas +scikit-learn +matplotlib +joblib +flask +EOF +``` + +Install all dependencies including Flask inside the Python virtual environment. + +```bash +pip install -r requirements.txt +``` + +Verify that Flask is installed successfully. + +```bash +pip list | grep Flask +``` + +The output is similar to: + +```output +Flask 3.1.3 +``` + +## Create inference API +In this step, you'll create a Flask-based API that loads the trained XGBoost model and exposes prediction endpoints over HTTP. + +The `/` endpoint is used for browser validation, while the `/predict` endpoint handles prediction requests using JSON input data. + +```bash +cat > inference_api.py <<'EOF' +from flask import Flask, request, jsonify +import numpy as np +import joblib + +app = Flask(__name__) + +model = joblib.load("xgboost-model.pkl") + +@app.route("/", methods=["GET"]) +def home(): + return """ +

XGBoost API Running on GCP Axion Arm64

+

Inference API Status : Active

+

Use POST /predict endpoint for predictions.

+ """ + +@app.route("/predict", methods=["POST"]) +def predict(): + + try: + data = request.json["features"] + + prediction = model.predict(np.array([data])) + + return jsonify({ + "prediction": int(prediction[0]) + }) + + except Exception as e: + return jsonify({ + "error": str(e) + }) + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=8080) +EOF +``` + +## Start the inference API +Start the Flask application so the API becomes accessible locally and externally through the VM public IP address. + +```bash +python inference_api.py +``` + +The output is similar to: + +```output + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8080 + * Running on http://10.128.15.209:8080 +``` + +Leave this terminal running because the Flask server must remain active to handle incoming requests. + +## Access API from browser +The Flask API can now be accessed externally from your browser using the VM public IP and port `8080`. + +Open: + +```text +http://:8080 +``` + +Example: + +```text +http://35.xxx.xxx.xxx:8080 +``` + +The output is similar to: + +```output +XGBoost Inference API is Running +API Status: Active + +This API is running on Google Cloud Axion Arm64. + +Use the POST /predict endpoint to send prediction requests. +``` + +The following screenshot shows the XGBoost inference API successfully running and accessible from the browser. + +![Browser window showing the XGBoost Inference API homepage running on a Google Cloud Axion Arm64 virtual machine. The page confirms that the inference API is active and accessible externally through port 8080 using the VM public IP address.#center](images/xgboost-api.png "XGBoost inference API running on Google Cloud Axion Arm64") + +## Test inference locally +Open terminal B and activate the same Python virtual environment used for the API server. + +```bash +cd ~/xgboost-learning-path +source xgb-env/bin/activate +``` + +In this step, you'll send a prediction request to the XGBoost API using `curl`. The input data is passed as JSON to the `/predict` endpoint. + +```bash +curl -X POST http://127.0.0.1:8080/predict \ +-H "Content-Type: application/json" \ +-d '{"features":[17.99,10.38,122.8,1001.0,0.1184,0.2776,0.3001,0.1471,0.2419,0.07871,1.095,0.9053,8.589,153.4,0.006399,0.04904,0.05373,0.01587,0.03003,0.006193,25.38,17.33,184.6,2019.0,0.1622,0.6656,0.7119,0.2654,0.4601,0.1189]}' +``` + +The output is similar to: + +```output +{"prediction":0} +``` +This confirms that the trained XGBoost model successfully received the input features and generated an inference response through the REST API. + +## What you've accomplished + +You've successfully: + +* Deployed XGBoost inference API on GCP Axion Arm64 +* Exposed the API externally +* Accessed the API using the VM public IP +* Performed inference using REST API requests +* Validated real-time predictions using Flask and XGBoost diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/firewall.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/firewall.md new file mode 100644 index 0000000000..eb1c889b93 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/firewall.md @@ -0,0 +1,53 @@ +--- +title: Configure Google Cloud firewall rules for XGBoost +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Allow inbound access to the XGBoost inference API + +Create a firewall rule in Google Cloud Console to expose the required port for the XGBoost inference API and browser-based access. + +{{% notice Note %}} For help with GCP setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/).{{% /notice %}} + +## Configure the firewall rule in Google Cloud Console + +To configure a firewall rule for the XGBoost inference API: + +1. Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**. + +![Google Cloud Console VPC Network Firewall page showing the Create firewall rule button in the top menu bar#center](images/firewall-rule.png "Create a firewall rule in Google Cloud Console") + +2. Create a firewall rule that exposes the ports required for XGBoost. + +3. Set **Name** to `allow-xgboost-8080`, then select the network you want to bind to your virtual machine. + +4. Set **Direction of traffic** to **Ingress**, set **Action on match** to **Allow**, set **Targets** to **All instances in the network**, and set **Source IPv4 ranges** to **0.0.0.0/0**. + +![Google Cloud Console Create firewall rule form with Name set to allow-xgboost-8080 and Direction of traffic set to Ingress#center](images/network-rule.png "Configuring the allow-xgboost-8080 firewall rule") + +5. Under **Protocols and ports**, select **Specified protocols and ports**. +6. Select the **TCP** checkbox and enter: + +```text +8080 +``` + +Port 8080 is used for: + +* XGBoost inference API access +* Browser-based API validation +* External REST API requests +* Remote inference testing from local systems + +![Google Cloud Console Protocols and ports section with TCP selected and port 8080 entered#center](images/network-port.png "Setting XGBoost ports in the firewall rule") + +7. Select **Create**. + +## What you've accomplished and what's next + +You've created a firewall rule to expose the XGBoost inference API externally. You also enabled browser access and remote API connectivity for inference testing. + +Next, you'll create a Google Axion C4A Arm virtual machine and attach it to this firewall rule. diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/firewall-rule.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/firewall-rule.png new file mode 100644 index 0000000000..ab99314834 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/firewall-rule.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-pubip-ssh.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-pubip-ssh.png new file mode 100644 index 0000000000..558745de3e Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-pubip-ssh.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-shell.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-shell.png new file mode 100644 index 0000000000..7e2fc3d1b5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-shell.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-vm.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-vm.png new file mode 100644 index 0000000000..0d1072e20d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/gcp-vm.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-port.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-port.png new file mode 100644 index 0000000000..513e705daf Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-port.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-rule.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-rule.png new file mode 100644 index 0000000000..87fc8d46a0 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/network-rule.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/xgboost-api.png b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/xgboost-api.png new file mode 100644 index 0000000000..bf935d9e26 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/images/xgboost-api.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/install-train-tune-xgboost.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/install-train-tune-xgboost.md new file mode 100644 index 0000000000..a656fc77a7 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/install-train-tune-xgboost.md @@ -0,0 +1,323 @@ +--- +title: Install XGBoost and train machine learning models +weight: 7 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Install and configure XGBoost on SUSE Linux + +In this section, you'll install XGBoost on a GCP Arm64 (Axion) virtual machine (VM) running SUSE Linux with Python 3.11. You'll then train machine learning models and tune model performance using hyperparameter optimization. + +You'll use: + +**Terminal A** → Setup and training + +**Terminal B** → Benchmarking and tuning + +Open both terminals connected to the VM before starting. + +## Connect to the VM + +Connect to the GCP Axion Arm64 virtual machine using SSH. This VM will be used for XGBoost training, benchmarking, and inference deployment. + +```bash +ssh @ +``` + +## Update the system +Update all system packages before installing Python and machine learning dependencies. This helps avoid package conflicts and ensures the latest updates are applied. + +```bash +sudo zypper refresh +sudo zypper update -y +``` + +## Install required dependencies +Install Python 3.11, development libraries, and build tools required for XGBoost and machine learning workloads. + +```bash +sudo zypper install -y \ + python311 \ + python311-pip \ + python311-devel \ + gcc \ + gcc-c++ \ + make \ + git \ + wget +``` + +Verify that Python 3.11 is installed correctly. + +```bash +python3.11 --version +``` + +## Create Python environment +Create a dedicated project directory and isolated Python virtual environment for the XGBoost learning path. + +```bash +mkdir -p ~/xgboost-learning-path +cd ~/xgboost-learning-path + +python3.11 -m venv xgb-env +source xgb-env/bin/activate +``` + +The virtual environment helps isolate Python packages from the system installation. + +## Upgrade pip tools: +Upgrade pip, setuptools, and wheel to ensure compatibility with the latest Python packages and build dependencies. + +```bash +pip install --upgrade pip setuptools wheel +``` + +## Create requirements file +Create a requirements file containing all Python packages required for XGBoost training and benchmarking. + +```bash +cat > requirements.txt <<'EOF' +xgboost +numpy +pandas +scikit-learn +matplotlib +joblib +EOF +``` + +## Install dependencies: +Install all machine learning dependencies inside the Python virtual environment. + +```bash +pip install -r requirements.txt +``` + +Verify that XGBoost is installed correctly. + +```bash +python -c "import xgboost; print(xgboost.__version__)" +``` + +The output is similar to: + +```output +3.2.0 +``` + +## Create XGBoost training script +In this step, you'll create a machine learning training script using the Breast Cancer dataset from Scikit-learn. + +The script trains an XGBoost classification model, measures training time, evaluates accuracy, and saves the trained model for inference. + +```bash +cat > train_xgboost.py <<'EOF' +from sklearn.datasets import load_breast_cancer +from sklearn.model_selection import train_test_split +from sklearn.metrics import accuracy_score +import xgboost as xgb +import joblib +import time + +data = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split( + data.data, + data.target, + test_size=0.2, + random_state=42 +) + +model = xgb.XGBClassifier( + n_estimators=200, + max_depth=6, + learning_rate=0.1, + tree_method="hist", + eval_metric="logloss" +) + +start = time.time() + +model.fit(X_train, y_train) + +end = time.time() + +predictions = model.predict(X_test) + +accuracy = accuracy_score(y_test, predictions) + +print(f"Model Accuracy : {accuracy:.4f}") +print(f"Training Time : {end - start:.2f} seconds") + +model.save_model("xgboost-model.json") + +joblib.dump(model, "xgboost-model.pkl") + +print("Model saved successfully") +EOF +``` + +## Train the model +Run the training script to start XGBoost model training on the Arm64 processor. + +```bash +python train_xgboost.py +``` + +The output is similar to: + +```output +Model Accuracy : 0.9561 +Training Time : 0.04 seconds +Model saved successfully +``` + +This confirms that the XGBoost model trained successfully and the model artifacts were generated. + +## Verify generated model files +Verify that the trained model files were created successfully after training. + +```bash +ls -lh +``` + +The output is similar to: + +```output +requirements.txt +train_xgboost.py +xgb-env +xgboost-model.json +xgboost-model.pkl +``` + +The `.json` and `.pkl` files will be used later for inference API deployment. + +## Hyperparameter tuning +In this step, you'll optimize model performance using GridSearchCV and multiple hyperparameter combinations. + +The script tests different values for tree depth, learning rate, and estimators to identify the best-performing model configuration. + +Create the tuning script: + +```bash +cat > tune_xgboost.py <<'EOF' +from sklearn.datasets import load_breast_cancer +from sklearn.model_selection import train_test_split, GridSearchCV +import xgboost as xgb + +data = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split( + data.data, + data.target, + test_size=0.2, + random_state=42 +) + +params = { + "max_depth": [4, 6, 8], + "learning_rate": [0.01, 0.1], + "n_estimators": [100, 200] +} + +model = xgb.XGBClassifier( + tree_method="hist", + eval_metric="logloss" +) + +grid = GridSearchCV( + model, + params, + cv=3, + n_jobs=-1 +) + +grid.fit(X_train, y_train) + +print("\nBest Parameters:") +print(grid.best_params_) +EOF +``` + +Run the hyperparameter tuning workflow. + +```bash +python tune_xgboost.py +``` + +The output is similar to: + +```output +Best Parameters: +{'learning_rate': 0.1, 'max_depth': 4, 'n_estimators': 100} +``` + +This identifies the best hyperparameter combination for the dataset. + +## Benchmark large-scale training +In this step, you'll benchmark XGBoost training performance using a larger synthetic dataset. + +The benchmark simulates large-scale tabular machine learning workloads on the GCP Axion Arm64 processor. + +Create benchmark script: + +```bash +cat > benchmark_xgboost.py <<'EOF' +from sklearn.datasets import make_classification +import xgboost as xgb +import time + +X, y = make_classification( + n_samples=500000, + n_features=50, + n_informative=25, + random_state=42 +) + +model = xgb.XGBClassifier( + n_estimators=300, + max_depth=8, + tree_method="hist", + eval_metric="logloss" +) + +start = time.time() + +model.fit(X, y) + +end = time.time() + +print(f"\nBenchmark completed in {end - start:.2f} seconds") +EOF +``` + +## Run benchmark +Run the benchmark script to measure large-scale training performance on Arm64. + +```bash +python benchmark_xgboost.py +``` + +The output is similar to: + +```output +Benchmark completed in 9.36 seconds +``` + +This validates that the Arm64-based Axion processor can efficiently handle large-scale XGBoost workloads. + +## What you've accomplished and what's next + +You've successfully: + +* Installed XGBoost on GCP Axion Arm64 +* Configured Python 3.11 environment +* Trained XGBoost models on Arm processors +* Tuned hyperparameters +* Benchmarked large-scale datasets + +Next, you'll deploy the trained model as an inference API and access it from your browser using the VM public IP. diff --git a/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/instance.md b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/instance.md new file mode 100644 index 0000000000..ecc646535d --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/xgboost-on-axion/instance.md @@ -0,0 +1,45 @@ +--- +title: Create a Google Axion C4A virtual machine for XGBoost +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Set up the virtual machine + +In this section, you'll create a Google Axion C4A Arm-based virtual machine (VM) on Google Cloud Platform (GCP). You'll use the `c4a-standard-4` machine type, which provides 4 vCPUs and 16 GB of memory. This VM will be used for XGBoost model training, hyperparameter tuning, benchmarking, and inference API deployment. + +{{% notice Note %}}For help with GCP setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/).{{% /notice %}} + +## Configure the C4A virtual machine in Google Cloud Console + +To create a virtual machine based on the C4A instance type in the console: + +1. Navigate to the [Google Cloud Console](https://console.cloud.google.com/). +2. Go to **Compute Engine** > **VM Instances** and select **Create Instance**. +3. Under **Machine configuration**, populate fields such as **Instance name**, **Region**, and **Zone**. +4. Set **Series** to `C4A`, then select `c4a-standard-4` for **Machine type**. + +![Screenshot of the Google Cloud Console showing the Machine configuration section. The Series dropdown is set to C4A and the machine type c4a-standard-4 is selected#center](images/gcp-vm.png "Configuring machine type to C4A in Google Cloud Console") + +5. Under **OS and storage**, select **Change** and then choose an Arm64-based operating system image. For this Learning Path, select **SUSE Linux Enterprise Server**. +6. For the license type, choose **Pay as you go**. +7. Increase **Size (GB)** from **10** to **100** to allocate sufficient disk space, and then select **Choose**. +8. Expand **Advanced options** and select **Networking**. +9. Under **Network tags**, enter `allow-xgboost-port` to link the VM to the firewall rule used for external API access and browser connectivity. +10. 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. + +![Google Cloud Console VM instances page displaying running instance with green checkmark and SSH button in the Connect column#center](images/gcp-pubip-ssh.png "Connecting to a running C4A VM using SSH") + +A new browser window opens with a terminal connected to your VM. + +![Browser-based SSH terminal connected to the Google Axion C4A VM. The shell prompt confirms that the instance is running and ready for the next step, where you'll install MLflow and its dependencies.#center](images/gcp-shell.png "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. You also configured firewall access for the XGBoost inference API. + +Next, you'll install XGBoost and configure a Python 3.11 environment on your VM for machine learning model training and benchmarking.