From 172c7dc1b81ce2baa4e15e50e59ba2a5ea7f949f Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 11:35:33 -0500 Subject: [PATCH 01/10] first pass on opencv on axion --- .../opencv-on-axion/_index.md | 5 +- .../opencv-on-axion/background.md | 26 +++---- .../opencv-on-axion/firewall-setup.md | 46 +++++------- .../opencv-on-axion/instance.md | 33 ++++---- .../opencv-foundation-pipelines.md | 75 +++++++++---------- .../opencv-ml-streaming-pipeline.md | 38 ++++------ 6 files changed, 93 insertions(+), 130 deletions(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md index 31258105a2..727c5ad5dc 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md @@ -1,10 +1,7 @@ --- -title: Build Computer Vision Pipelines with OpenCV on Google Cloud C4A Axion VM +title: Build computer vision pipelines with OpenCV on a Google Cloud C4A Axion VM description: Deploy and run OpenCV-based computer vision pipelines on Google Cloud Axion C4A Arm-based VMs, covering image processing, video pipelines, browser-based visualization, and integration with machine learning models. -draft: true -cascade: - draft: true minutes_to_complete: 45 diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md index ed184da710..cc082df970 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md @@ -1,30 +1,30 @@ --- -title: Get started with OpenCV on Google Axion C4A +title: Learn about OpenCV on Google Axion C4A weight: 2 layout: "learningpathall" --- -## Explore Axion C4A Arm instances in Google Cloud +## Arm-based Axion C4A instances in Google Cloud 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 leveraging the scalability and performance benefits of the Arm architecture in Google Cloud. +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). -## Explore OpenCV on Google Axion C4A (Arm Neoverse V2) +## OpenCV on Google Axion C4A -OpenCV (Open Source Computer Vision Library) is a widely used open-source library for building real-time computer vision and image processing applications. It provides optimized implementations for image transformations, video processing, object detection, and integration with machine learning models. +Open Source Computer Vision Library (OpenCV) is a widely used open-source library for building real-time computer vision and image processing applications. It provides optimized implementations for image transformations, video processing, object detection, and integration with machine learning models. -Key capabilities of OpenCV include: + -Running OpenCV on Google Axion C4A Arm-based infrastructure enables efficient execution of image and video workloads by leveraging multi-core CPU parallelism. This allows: +When you run OpenCV on Google Axion C4A Arm-based infrastructure, you can execute image and video workloads efficiently by using multi-core CPU parallelism. This allows: * Faster frame processing for video pipelines * Efficient memory utilization for image transformations @@ -33,14 +33,10 @@ Running OpenCV on Google Axion C4A Arm-based infrastructure enables efficient ex Common use cases include real-time video analytics, image transformation pipelines, automated inspection systems, and ML-powered vision applications. -To learn more, visit the [OpenCV documentation](https://docs.opencv.org/) and explore the [OpenCV GitHub repository](https://github.com/opencv/opencv). +To learn more, see the [OpenCV documentation](https://docs.opencv.org/) and explore the [OpenCV GitHub repository](https://github.com/opencv/opencv). -## What you've accomplished and what's next +## What you've learned and what's next -In this section, you: - -* Explored Google Axion C4A Arm-based VMs and their benefits for computer vision workloads -* Understood OpenCV capabilities for image and video processing -* Learned how Arm architecture improves performance and efficiency for OpenCV pipelines +You've now learned about Google Axion C4A Arm-based VMs and their benefits for computer vision workloads. You also understood how OpenCV supports image and video processing, and how the Arm architecture improves performance and efficiency for OpenCV pipelines. Next, you'll create a firewall rule to enable browser-based visualization of OpenCV pipelines running on your Arm-based virtual machine. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md index 28cab745f5..88e75e4745 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md @@ -9,7 +9,9 @@ weight: 3 layout: learningpathall --- - + +## Expose port for OpenCV browser-based visualization + Create a firewall rule in Google Cloud Console to expose the required port for OpenCV browser-based visualization. {{% notice Note %}} @@ -18,25 +20,25 @@ For help with GCP setup, see the Learning Path [Getting started with Google Clou {{% /notice %}} -## Configure the firewall rule +### Configure the firewall rule + +Configure the firewall rule using the Google Cloud Console: -Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**. +1. Open the [Google Cloud Console](https://console.cloud.google.com/), navigate 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") -Next, create the firewall rule that exposes the required port for OpenCV visualization. +2. Set the **Name** of the new rule to **allow-opencv-port**. Select the network that you intend to bind to your VM. -Set the **Name** of the new rule to "allow-opencv-port". Select your network that you intend to bind to your VM. - -Set **Direction of traffic** to "Ingress". +3. For **Direction of traffic**, select **Ingress**. -Set **Allow on match** to "Allow". +4. For **Allow on match**, select **Allow**. -Set **Targets** to "Specified target tags". +5. For **Targets**, select **Specified target tags**. -Enter "allow-opencv" in the **Target tags** field. +6. For **Target tags**, enter **allow-opencv**. -Set **Source IPv4 ranges** to your current machine's public IP address. Run the following command in a terminal on your local machine (not on the VM) to find it: +7. Set **Source IPv4 ranges** to your current machine's public IP address. Run the following command in a terminal on your local machine to find the address: ```bash curl -4 ifconfig.me @@ -48,29 +50,17 @@ The `-4` flag forces an IPv4 response. Take the returned address and append `/32 ![Google Cloud Console Create firewall rule form configured for OpenCV with Ingress and Allow settings#center](images/network-rule.png "Configuring the OpenCV firewall rule") -## Configure port -Under **Protocols and ports**, select **Specified protocols and ports**. +8. For **Protocols and ports**, select **Specified protocols and ports**. -Select the **TCP** checkbox and enter: +9. Select the **TCP** checkbox and, for **Ports**, enter **8000**. -```text -8000 -``` - -Then select **Create**. +10. Select **Create**. ![Google Cloud Console Protocols and ports section showing TCP checkbox selected with port 8000 configured for OpenCV Browser Visualization#center](images/network-port.png "Setting Ray ports in the firewall rule") ## What you've accomplished and what's next -In this section, you: - -* Created a firewall rule for OpenCV visualization -* Enabled external browser access to your VM -* Exposed port 8000 for real-time pipeline outputs -Next, you'll: +You've now created a firewall rule for OpenCV visualization that enables external browser access to your VM and exposes port 8000 for real-time pipeline outputs. -* Run image and video pipelines -* Integrate ML models with OpenCV -* Optimize performance on Arm-based systems +Next, you'll create a Google Axion virtual machine to host your OpenCV application. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md index 5855126068..63c73b3b3e 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md @@ -1,14 +1,14 @@ --- -title: Create a Google Axion C4A Arm virtual machine on GCP +title: Create a Google Axion C4A Arm virtual machine weight: 4 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Provision a Google Axion C4A Arm VM +## Provision a Google Axion C4A Arm-based VM -In this section, you'll create a Google Axion C4A Arm-based virtual machine on Google Cloud Platform. You'll use the `c4a-standard-4` machine type, which provides 4 vCPUs and 16 GB of memory. This VM will host your OpenCV application. +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 host your OpenCV application. {{% 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/). @@ -18,22 +18,21 @@ For help with GCP setup, see the Learning Path [Getting started with Google Clou To create a virtual machine based on the C4A instance type: -- Navigate to the [Google Cloud Console](https://console.cloud.google.com/). -- 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`. - - Select `c4a-standard-4` for machine type. +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**. + - Set **Series** to `C4A`. + - 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") -- 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. - - Select **Choose** to apply the changes. -- Expand the **Networking** section and enter `allow-opencv` in the **Network tags** field. This tag links the VM to the firewall rule you created earlier, enabling external access to the OpenCV Dashboard and Serve API ports. -- Select **Create** to launch the virtual machine. +4. 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. + - Select **Choose** to apply the changes. +5. Expand the **Networking** section and enter `allow-opencv` in the **Network tags** field. This tag links the VM to the firewall rule you created earlier, enabling external access to the OpenCV Dashboard and Serve API ports. +6. 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. @@ -45,6 +44,6 @@ A new browser window opens with a terminal connected to your VM. ## What you've accomplished and what's next -In this section, you provisioned a Google Axion C4A Arm VM and connected to it using SSH. +In this section, you provisioned a Google Axion C4A Arm VM and connected to it using SSH. You'll use this VM to run your OpenCV application. Next, you'll install OpenCV and the required dependencies on your VM. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md index 7d0d7e124f..12d7b4715f 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md @@ -1,24 +1,16 @@ --- -title: Build OpenCV Pipelines on GCP Axion (Arm) +title: Build OpenCV Pipelines on Google Axion weight: 5 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Build OpenCV pipelines on GCP Axion +## Set up OpenCV on an Arm-based virtual machine -This section guides you through setting up OpenCV on an Arm-based VM and building image and video processing pipelines with browser visualization. +In this section, you'll learn how to set up OpenCV on an Arm-based VM and build image and video processing pipelines with browser visualization. -## Learning objectives - -- Install OpenCV on Arm -- Build an image processing pipeline -- Build a video processing pipeline -- Visualize pipeline output in a browser - - -## Update your system +### Update your system Refresh the package metadata to ensure you install the latest available versions: @@ -26,7 +18,7 @@ Refresh the package metadata to ensure you install the latest available versions sudo zypper refresh ``` -## Install dependencies +### Install dependencies Install Python 3.11 and the build tools that OpenCV's pip package requires to compile native extensions: @@ -36,7 +28,7 @@ python311 python311-pip python311-devel \ gcc gcc-c++ make cmake ``` -## Create the project directory +### Create the project directory Create a dedicated workspace for your OpenCV project and change into it: @@ -45,7 +37,7 @@ mkdir -p ~/opencv-project cd ~/opencv-project ``` -## Set up a Python virtual environment +### Set up a Python virtual environment Create an isolated Python environment to keep OpenCV and its dependencies separate from the system Python installation: @@ -54,18 +46,20 @@ python3.11 -m venv cv-env source cv-env/bin/activate ``` -## Install Python packages +### Install Python packages -`opencv-python-headless` is the server-appropriate OpenCV build — it omits GUI window support, which is not available on a remote VM. `flask` is included for optional HTTP serving use cases. +Install the following Python packages: ```bash pip install --upgrade pip pip install numpy opencv-python-headless flask ``` -## Start the browser server +`opencv-python-headless` is the server-appropriate OpenCV build. It omits GUI window support, which is not available on a remote VM. `flask` is included for optional HTTP serving use cases. -Before verifying any output in the browser, start a simple HTTP server in the background. This server serves files from `~/opencv-project` on port 8000 and must remain running throughout this Learning Path. +### Start the browser server + +Before verifying any output in the browser, start an HTTP server in the background. This server serves files from `~/opencv-project` on port 8000 and must remain running throughout this Learning Path. ```bash python -m http.server 8000 & @@ -73,9 +67,9 @@ python -m http.server 8000 & The `&` runs the server as a background process so you can continue using the same terminal. To stop it later, run `kill %1` or `pkill -f "http.server"`. -## Quick OpenCV test +### Verify OpenCV is working -Before building pipelines, verify that OpenCV is working correctly. This step creates a simple image using OpenCV and saves it for browser viewing. +Before building pipelines, verify that OpenCV is working correctly. This file creates an image using OpenCV and saves it for browser viewing. ```bash python - <` with your VM's external IP address: ```text http://:8000/test.jpg ``` -You should see an image with text: +You should see an image with the following text: ```text OpenCV OK @@ -113,10 +105,14 @@ OpenCV OK ![OpenCV test image showing "OpenCV OK" text rendered using OpenCV on Arm VM#center](images/opencv-test.png "OpenCV verification output") -## Image pipeline +## Set up an image pipeline The image pipeline reads an input image, applies transformations using OpenCV, and saves the result so the HTTP server can serve it to your browser. +### Create image pipeline + +First, create the image pipeline. + Create the pipeline script: ```python @@ -136,16 +132,11 @@ cv2.putText(img, "IMAGE PIPELINE", (20,40), cv2.imwrite("latest.jpg", img) ``` -### What this script does +The script loads an image using OpenCV and applies basic processing such as resize and text overlay. It then saves output as `latest.jpg`. The output file is used for browser visualization. -- Loads an image using OpenCV -- Applies basic processing (resize + text overlay) -- Saves output as `latest.jpg` -- This file is used for browser visualization +### Generate a sample input image -## Generate a sample input image - -Instead of downloading an external image, generate one locally. This ensures the pipeline works in all environments without an internet dependency. +Instead of downloading an external image, generate an image locally. Doing so ensures the pipeline works in all environments without an internet dependency. ```bash python - <:8000/ml_output.jpg You should see an image showing the pipeline title, the Arm64 platform label, the input feature values, and the predicted Iris species. ![OpenCV ML pipeline output showing prediction result on GCP Axion Arm VM#center](images/opencv-ml.png "OpenCV ML pipeline output") -## Troubleshooting +### Troubleshoot integration issues **`ModuleNotFoundError: No module named 'sklearn'`** @@ -318,6 +306,6 @@ Use this only if you want to remove generated ML and output files. rm -f iris_model.joblib iris_labels.joblib ml_output.jpg ``` -## What you've learned +## What you've accomplished -You've trained a Random Forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a GCP Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — applies directly to production vision pipelines where models are updated independently of the display layer. +You've trained a Random Forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a Google Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — applies directly to production vision pipelines where models are updated independently of the display layer. From 5e2a998ff5cdd80cf4670344c1b37ca5bbc6d50e Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:04:10 -0500 Subject: [PATCH 02/10] second pass --- .../opencv-on-axion/_index.md | 3 +-- .../opencv-on-axion/background.md | 27 +++++++------------ .../opencv-on-axion/firewall-setup.md | 8 +++--- .../opencv-on-axion/instance.md | 6 ++--- .../opencv-foundation-pipelines.md | 6 ++--- .../opencv-ml-streaming-pipeline.md | 18 +++++++------ 6 files changed, 31 insertions(+), 37 deletions(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md index 727c5ad5dc..96a87432bb 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/_index.md @@ -1,8 +1,7 @@ --- title: Build computer vision pipelines with OpenCV on a Google Cloud C4A Axion VM description: Deploy and run OpenCV-based computer vision pipelines on Google Cloud Axion C4A Arm-based VMs, covering image processing, video pipelines, browser-based visualization, and integration with machine learning models. - - + minutes_to_complete: 45 who_is_this_for: This is an introductory topic for DevOps engineers, software developers, and AI practitioners who want to build and run computer vision pipelines on SUSE Linux Enterprise Server (SLES) Arm64 using OpenCV, process images and videos, visualize outputs in real time, and integrate ML models. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md index cc082df970..94c2ca32b9 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/background.md @@ -1,5 +1,5 @@ --- -title: Learn about OpenCV on Google Axion C4A +title: Understand OpenCV on Google Axion C4A weight: 2 layout: "learningpathall" @@ -13,23 +13,16 @@ The C4A series provides a cost-effective alternative to x86 virtual machines whi 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). -## OpenCV on Google Axion C4A +## OpenCV on Google Axion C4A -Open Source Computer Vision Library (OpenCV) is a widely used open-source library for building real-time computer vision and image processing applications. It provides optimized implementations for image transformations, video processing, object detection, and integration with machine learning models. +Open Source Computer Vision Library (OpenCV) is an open-source library for real-time computer vision and image processing applications. It includes implementations for image transforms, video processing, object detection, and integration with machine learning models. - - -When you run OpenCV on Google Axion C4A Arm-based infrastructure, you can execute image and video workloads efficiently by using multi-core CPU parallelism. This allows: - -* Faster frame processing for video pipelines -* Efficient memory utilization for image transformations -* Improved performance-per-watt compared to x86 systems -* Cost-effective scaling for computer vision workloads +* Process video frames faster in CPU-based pipelines +* Use memory efficiently for common image transformations +* Improve performance-per-watt for sustained processing jobs +* Scale vision services in cloud environments with predictable costs Common use cases include real-time video analytics, image transformation pipelines, automated inspection systems, and ML-powered vision applications. @@ -37,6 +30,6 @@ To learn more, see the [OpenCV documentation](https://docs.opencv.org/) and expl ## What you've learned and what's next -You've now learned about Google Axion C4A Arm-based VMs and their benefits for computer vision workloads. You also understood how OpenCV supports image and video processing, and how the Arm architecture improves performance and efficiency for OpenCV pipelines. +You've now reviewed what Google Axion C4A instances provide on Arm and why they are a good fit for OpenCV workloads. You also mapped OpenCV capabilities to practical cloud use cases you can run on C4A. -Next, you'll create a firewall rule to enable browser-based visualization of OpenCV pipelines running on your Arm-based virtual machine. +Next, you'll create a firewall rule so you can view OpenCV pipeline output from your browser while your application runs on an Arm-based virtual machine. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md index 88e75e4745..01215283af 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/firewall-setup.md @@ -1,6 +1,6 @@ --- -title: Create a firewall rule for OpenCV Browser Visualization +title: Create a firewall rule for OpenCV browser visualization weight: 3 @@ -12,11 +12,11 @@ layout: learningpathall ## Expose port for OpenCV browser-based visualization -Create a firewall rule in Google Cloud Console to expose the required port for OpenCV browser-based visualization. +Create a firewall rule in Google Cloud Console to allow browser access to your OpenCV output on port 8000. {{% 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/). +For help with Google Cloud Platform setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/). {{% /notice %}} @@ -57,7 +57,7 @@ The `-4` flag forces an IPv4 response. Take the returned address and append `/32 10. Select **Create**. -![Google Cloud Console Protocols and ports section showing TCP checkbox selected with port 8000 configured for OpenCV Browser Visualization#center](images/network-port.png "Setting Ray ports in the firewall rule") +![Google Cloud Console Protocols and ports section showing TCP checkbox selected with port 8000 configured for OpenCV browser visualization#center](images/network-port.png "Setting ports in the firewall rule") ## What you've accomplished and what's next diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md index 63c73b3b3e..35c7943283 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/instance.md @@ -8,7 +8,7 @@ layout: learningpathall ## Provision a Google Axion C4A Arm-based VM -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 host your OpenCV application. +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 with four vCPUs and 16 GB of memory. This VM will host your OpenCV application. {{% 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/). @@ -31,7 +31,7 @@ To create a virtual machine based on the C4A instance type: - For the license type, choose **Pay as you go**. - Increase **Size (GB)** from **10** to **100** to allocate sufficient disk space. - Select **Choose** to apply the changes. -5. Expand the **Networking** section and enter `allow-opencv` in the **Network tags** field. This tag links the VM to the firewall rule you created earlier, enabling external access to the OpenCV Dashboard and Serve API ports. +5. Expand the **Networking** section and enter `allow-opencv` in the **Network tags** field. This tag links the VM to the firewall rule you created earlier, so your browser can access the OpenCV output. 6. 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. @@ -44,6 +44,6 @@ A new browser window opens with a terminal connected to your VM. ## What you've accomplished and what's next -In this section, you provisioned a Google Axion C4A Arm VM and connected to it using SSH. You'll use this VM to run your OpenCV application. +You've now provisioned a Google Axion C4A Arm VM and connected to it using SSH. You'll use this VM to run your OpenCV application. Next, you'll install OpenCV and the required dependencies on your VM. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md index 12d7b4715f..c0d81d723a 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md @@ -1,5 +1,5 @@ --- -title: Build OpenCV Pipelines on Google Axion +title: Build OpenCV pipelines on Google Axion weight: 5 ### FIXED, DO NOT MODIFY @@ -113,7 +113,7 @@ The image pipeline reads an input image, applies transformations using OpenCV, a First, create the image pipeline. -Create the pipeline script: +Create the pipeline script by saving the following in `image_pipeline.py`: ```python import cv2 @@ -309,6 +309,6 @@ With the video pipeline running in the terminal, you should see frames update au ## What you've learned and what's next -You've now installed OpenCV on a Google Axion Arm VM. You've built an image pipeline that applies transformations and saves output for browser viewing. You've also built a video pipeline that loops frames and serves them as a live feed via a lightweight HTTP server. +You've now installed OpenCV on a Google Axion Arm VM. You've built an image pipeline that applies transformations and saves output for browser viewing. You've also created a video pipeline that loops frames and serves them as a live feed via a lightweight HTTP server. Next, you'll extend this setup by integrating a machine learning model with the OpenCV pipeline. diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index 49f3b2b25c..11665188ef 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -8,13 +8,13 @@ layout: learningpathall ## Integrate a machine learning model with an OpenCV pipeline -This section extends the OpenCV Learning Path by integrating a machine learning model with an OpenCV pipeline. You will train a simple ML model, load it inside an OpenCV-based Python script, generate a visual prediction output, and view the result in a browser. +In this section, you'll integrate a machine learning model with an OpenCV pipeline. You'll train a simple ML model, load it inside an OpenCV-based Python script, generate a visual prediction output, and view the result in your browser. ### Before you begin Make sure you have: -- A running GCP Axion Arm-based VM with SUSE Linux +- A running Google Axion Arm-based VM with SUSE Linux - Python 3.11 installed - The OpenCV project directory at `~/opencv-project` with the `cv-env` virtual environment created and OpenCV installed - Port `8000` open in the GCP firewall @@ -258,11 +258,13 @@ http://:8000/ml_output.jpg ``` You should see an image showing the pipeline title, the Arm64 platform label, the input feature values, and the predicted Iris species. -![OpenCV ML pipeline output showing prediction result on GCP Axion Arm VM#center](images/opencv-ml.png "OpenCV ML pipeline output") + +![OpenCV ML pipeline output image showing the predicted Iris class and input feature values, confirming successful inference and OpenCV rendering on Axion Arm VM.#center](images/opencv-ml.png "OpenCV ML pipeline output") + ### Troubleshoot integration issues -**`ModuleNotFoundError: No module named 'sklearn'`** +#### ModuleNotFoundError: No module named 'sklearn' Make sure the virtual environment is activated and reinstall the dependency: @@ -272,7 +274,7 @@ source cv-env/bin/activate pip install scikit-learn joblib ``` -**`iris_model.joblib` not found** +#### iris_model.joblib not found Run the training script before running the ML pipeline: @@ -280,7 +282,7 @@ Run the training script before running the ML pipeline: python train_ml_model.py ``` -**Browser cannot access the output image** +#### Browser cannot access the output image Check that the HTTP server is running: @@ -290,7 +292,7 @@ python -m http.server 8000 & Also make sure port `8000` is allowed in the GCP firewall. -**Output image does not update** +#### Output image does not update Run the pipeline again after changing the sample input, then refresh the browser: @@ -298,7 +300,7 @@ Run the pipeline again after changing the sample input, then refresh the browser python opencv_ml_pipeline.py ``` -**Clean up generated files** +#### Clean up generated files Use this only if you want to remove generated ML and output files. From 2b7ffe23a95e0049fa2e0e27c58171fee8026cef Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:17:27 -0500 Subject: [PATCH 03/10] nits --- .../opencv-on-axion/opencv-foundation-pipelines.md | 2 +- .../opencv-on-axion/opencv-ml-streaming-pipeline.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md index c0d81d723a..e52f392ca6 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md @@ -30,7 +30,7 @@ gcc gcc-c++ make cmake ### Create the project directory -Create a dedicated workspace for your OpenCV project and change into it: +Create a dedicated workspace for your OpenCV project and navigate to it: ```bash mkdir -p ~/opencv-project diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index 11665188ef..539fc9c9d6 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -143,7 +143,7 @@ ls -lh iris_model.joblib iris_labels.joblib ``` ### Create the OpenCV and ML pipeline -The pipeline loads the trained model and label names, runs a prediction on a fixed sample input, and uses OpenCV to render the input features and prediction result as text on an output image. The image is saved as `ml_output.jpg` for the HTTP server to serve. +The pipeline loads the trained model and label names, and runs a prediction on a fixed sample input. It then uses OpenCV to render the input features and prediction result as text on an output image. The image is saved as `ml_output.jpg` for the HTTP server to serve. ```bash cat > opencv_ml_pipeline.py <<'EOF' @@ -251,7 +251,7 @@ source cv-env/bin/activate python -m http.server 8000 & ``` -Open the following URL in your browser, replacing `` with the external IP address of your GCP Axion VM: +Open the following URL in your browser, replacing `` with the external IP address of your Google Axion VM: ```text http://:8000/ml_output.jpg @@ -310,4 +310,4 @@ rm -f iris_model.joblib iris_labels.joblib ml_output.jpg ## What you've accomplished -You've trained a Random Forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a Google Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — applies directly to production vision pipelines where models are updated independently of the display layer. +You've trained a Random Forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a Google Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — mirrors production vision pipelines, where models are updated independently of the display layer. From 7049dbfa668829e8739d503d0e2ad06daecc65a4 Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:26:11 -0500 Subject: [PATCH 04/10] nit --- .../opencv-on-axion/opencv-foundation-pipelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md index e52f392ca6..8a27951aac 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-foundation-pipelines.md @@ -69,7 +69,7 @@ The `&` runs the server as a background process so you can continue using the sa ### Verify OpenCV is working -Before building pipelines, verify that OpenCV is working correctly. This file creates an image using OpenCV and saves it for browser viewing. +Before building pipelines, verify that OpenCV is working correctly. This script creates an image using OpenCV and saves it for browser viewing. ```bash python - < Date: Tue, 12 May 2026 13:31:32 -0500 Subject: [PATCH 05/10] nit --- .../opencv-on-axion/opencv-ml-streaming-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index 539fc9c9d6..d005547af2 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -290,7 +290,7 @@ Check that the HTTP server is running: python -m http.server 8000 & ``` -Also make sure port `8000` is allowed in the GCP firewall. +Also make sure port `8000` is allowed in the Google Cloud Platform firewall. #### Output image does not update From 5019786307e6e3aaa142c836a682fc2f309fd70e Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:46:13 -0500 Subject: [PATCH 06/10] changing h1s to h2/h3 --- .../laptops-and-desktops/wsl2/ssh.md | 11 ++++++++--- .../gcp/terraform.md | 18 +++++++++--------- .../migration/golang.md | 2 +- .../migration/java.md | 14 ++++++-------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/content/learning-paths/laptops-and-desktops/wsl2/ssh.md b/content/learning-paths/laptops-and-desktops/wsl2/ssh.md index e12a3e7983..9c66667b40 100644 --- a/content/learning-paths/laptops-and-desktops/wsl2/ssh.md +++ b/content/learning-paths/laptops-and-desktops/wsl2/ssh.md @@ -80,7 +80,7 @@ There are two options to SSH from another machine on the local network: - Bridged networking - Port forwarding -# Bridged networking +### Bridged networking WSL uses NAT by default. This means the Linux distribution running in WSL will get an IP address starting with 172.X.X.X and not an IP address on the local network. NAT makes it impossible to SSH to WSL. @@ -88,7 +88,7 @@ One way to get an IP on the local network is to use a bridged network. For more information refer to the [short WSL bridging and networking reference](https://github.com/luxzg/WSL2-fixes/blob/master/networkingMode%3Dbridged%20-%20quick%20setup.md) -# Port forwarding +### Port forwarding Another way to connect to WSL via SSH is to forward or proxy the Windows port for SSH, such as 2022, to the WSL instance. @@ -120,8 +120,13 @@ Get the IP address of Windows: ipconfig ``` -From another local machine SSH to the Windows IP on port 2022 and it should forward to WSL running on that Windows computer. +From another local machine, SSH to the Windows IP on port 2022. It should forward to WSL running on that Windows computer. +## What you've accomplished and what's next + +You've now learned when SSH is useful for WSL and when the built-in `/mnt/c` mount is enough for local file transfers. You installed and started the OpenSSH server inside your Linux distribution, connected from Windows using `ssh.exe`, changed the SSH port when needed, and reviewed options for connecting to WSL from another machine on your local network. + +Next, you'll learn how to connect to WSL using RDP and VNC so you can work with a full Linux desktop environment from Windows. diff --git a/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md b/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md index bfedc010ba..bdb7d88b54 100644 --- a/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md +++ b/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md @@ -8,9 +8,9 @@ weight: 2 # 1 is first, 2 is second, etc. layout: "learningpathall" --- -# Deploy an Arm based VM using Terraform +## Deploy an Arm based VM using Terraform -## Generate an SSH key pair +### Generate an SSH key pair Generate an SSH key pair (public key, private key) using `ssh-keygen` to use for Arm VMs access. To generate the key pair, follow this [guide](/install-guides/ssh#ssh-keys). @@ -19,13 +19,13 @@ If you already have an SSH key pair present in the `~/.ssh` directory, you can s {{% /notice %}} -## Acquire GCP Access Credentials +### Acquire GCP Access Credentials The installation of Terraform on your Desktop/Laptop needs to communicate with GCP. Thus, Terraform needs to be authenticated. To obtain GCP user credentials, follow this [guide](/install-guides/gcloud#acquire-user-credentials). -## Terraform infrastructure +### Terraform infrastructure Add resources required to create a VM in `main.tf`. Add below code in `main.tf` file: @@ -64,9 +64,9 @@ resource "google_compute_instance" "vm_instance" { Replace `project_ID` with your value which can be found in the [Dashboard](https://console.cloud.google.com/home?_ga=2.56408877.721166205.1675053595-562732326.1671688536&_gac=1.125526520.1675155465.CjwKCAiAleOeBhBdEiwAfgmXfwdH3kCFBFeYzoKSuP1DzwJq7nY083_qzg7oyP2gwxMvaE0PaHVgFhoCmXoQAvD_BwE) of Google Cloud console. {{% /notice %}} -## Terraform commands +### Terraform commands -### Initialize Terraform +#### Initialize Terraform Run `terraform init` to initialize the Terraform deployment. This command downloads all the modules required to manage your resources. ``` @@ -100,7 +100,7 @@ rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary. ``` -### Create a Terraform execution plan +#### Create a Terraform execution plan Run `terraform plan` to create an execution plan. ``` @@ -109,7 +109,7 @@ Run `terraform plan` to create an execution plan. A long output of resources to be created will be printed. -### Apply a Terraform execution plan +#### Apply a Terraform execution plan Run `terraform apply` to apply the execution plan to your cloud infrastructure. Below command creates all required infrastructure. ``` @@ -132,7 +132,7 @@ In the Google Cloud console, go to the [VM instances page](https://console.cloud ![terraform4 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/40816837/320b4c6f-0d2b-44f3-9517-dc427d82a018) -## SSH into the launched instance +### SSH into the launched instance Run following command to connect to VM through SSH: diff --git a/content/learning-paths/servers-and-cloud-computing/migration/golang.md b/content/learning-paths/servers-and-cloud-computing/migration/golang.md index d8f5da78dc..81826d09d8 100644 --- a/content/learning-paths/servers-and-cloud-computing/migration/golang.md +++ b/content/learning-paths/servers-and-cloud-computing/migration/golang.md @@ -8,7 +8,7 @@ layout: "learningpathall" --- -# Go on Arm Neoverse processors +## Go on Arm Neoverse processors [Go](https://go.dev/) is a statically typed, compiled programming language supported by Google. diff --git a/content/learning-paths/servers-and-cloud-computing/migration/java.md b/content/learning-paths/servers-and-cloud-computing/migration/java.md index f49d1bdd12..3c27026e06 100644 --- a/content/learning-paths/servers-and-cloud-computing/migration/java.md +++ b/content/learning-paths/servers-and-cloud-computing/migration/java.md @@ -8,19 +8,17 @@ layout: "learningpathall" --- -# Java on Arm Neoverse processors +## Java on Arm Neoverse processors Java is a general-purpose, high-level programming language used in a wide variety of applications. -Java code is typically compiled to bytecode that runs on a Java virtual machine (JVM) making it portable across computer architectures. +Java code is usually compiled to bytecode that runs on a Java virtual machine (JVM) making it portable across computer architectures. -There are many ways to install Java on Arm Linux distributions. Refer to the [Java install guide](/install-guides/java/) for information about how to install Java. - -# How can I increase Java performance on Arm? +There are many ways to install Java on Arm Linux distributions. For more information, see the [Java install guide](/install-guides/java/). Java runs well on Arm, but there are some things to investigate to make sure you are getting the best performance. -## Which JVM flags impact performance? +## JVM flags that impact performance The JVM includes a number of flags which are available to tune performance and aid in debugging. Some of the flags are general purpose and some are Arm architecture specific. @@ -30,7 +28,7 @@ To print the final values of the flags after the JVM has been initialized run: java -XX:+PrintFlagsFinal -version ``` -Use the output from the above command to see the current values before making any changes. +Use the output from the previous command to see the current values before making any changes. For example, to check the value of `CICompilerCount` run: @@ -58,7 +56,7 @@ The `-XX:CompilationMode` flag instructs the JIT compiler to to use highest opti The best way to determine optimal values for your application is to test your application with different values. -### Architecture flags +#### Architecture flags There are flags that are specific to the Arm architecture and indicate if a particular hardware feature is used. You can see all the flags by running: From 7ddeebf220f113c854662f2868e564e936f34f19 Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:55:14 -0500 Subject: [PATCH 07/10] Revert "nit" This reverts commit e7efa0bd68837efb4da05621aad8c1489bb86140. --- .../opencv-on-axion/opencv-ml-streaming-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index d005547af2..539fc9c9d6 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -290,7 +290,7 @@ Check that the HTTP server is running: python -m http.server 8000 & ``` -Also make sure port `8000` is allowed in the Google Cloud Platform firewall. +Also make sure port `8000` is allowed in the GCP firewall. #### Output image does not update From d8d813eed450c5e3e29c9c162009728722ab9994 Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:55:48 -0500 Subject: [PATCH 08/10] Revert "changing h1s to h2/h3" This reverts commit 5019786307e6e3aaa142c836a682fc2f309fd70e. --- .../laptops-and-desktops/wsl2/ssh.md | 11 +++-------- .../gcp/terraform.md | 18 +++++++++--------- .../migration/golang.md | 2 +- .../migration/java.md | 14 ++++++++------ 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/content/learning-paths/laptops-and-desktops/wsl2/ssh.md b/content/learning-paths/laptops-and-desktops/wsl2/ssh.md index 9c66667b40..e12a3e7983 100644 --- a/content/learning-paths/laptops-and-desktops/wsl2/ssh.md +++ b/content/learning-paths/laptops-and-desktops/wsl2/ssh.md @@ -80,7 +80,7 @@ There are two options to SSH from another machine on the local network: - Bridged networking - Port forwarding -### Bridged networking +# Bridged networking WSL uses NAT by default. This means the Linux distribution running in WSL will get an IP address starting with 172.X.X.X and not an IP address on the local network. NAT makes it impossible to SSH to WSL. @@ -88,7 +88,7 @@ One way to get an IP on the local network is to use a bridged network. For more information refer to the [short WSL bridging and networking reference](https://github.com/luxzg/WSL2-fixes/blob/master/networkingMode%3Dbridged%20-%20quick%20setup.md) -### Port forwarding +# Port forwarding Another way to connect to WSL via SSH is to forward or proxy the Windows port for SSH, such as 2022, to the WSL instance. @@ -120,13 +120,8 @@ Get the IP address of Windows: ipconfig ``` -From another local machine, SSH to the Windows IP on port 2022. It should forward to WSL running on that Windows computer. +From another local machine SSH to the Windows IP on port 2022 and it should forward to WSL running on that Windows computer. -## What you've accomplished and what's next - -You've now learned when SSH is useful for WSL and when the built-in `/mnt/c` mount is enough for local file transfers. You installed and started the OpenSSH server inside your Linux distribution, connected from Windows using `ssh.exe`, changed the SSH port when needed, and reviewed options for connecting to WSL from another machine on your local network. - -Next, you'll learn how to connect to WSL using RDP and VNC so you can work with a full Linux desktop environment from Windows. diff --git a/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md b/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md index 1b20a2090e..66880364d0 100644 --- a/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md +++ b/content/learning-paths/servers-and-cloud-computing/gcp/terraform.md @@ -8,9 +8,9 @@ weight: 2 # 1 is first, 2 is second, etc. layout: "learningpathall" --- -## Deploy an Arm based VM using Terraform +# Deploy an Arm based VM using Terraform -### Generate an SSH key pair +## Generate an SSH key pair Generate an SSH key pair (public key, private key) using `ssh-keygen` to use for Arm VMs access. To generate the key pair, follow this [guide](/install-guides/ssh/#ssh-keys). @@ -19,13 +19,13 @@ If you already have an SSH key pair present in the `~/.ssh` directory, you can s {{% /notice %}} -### Acquire GCP Access Credentials +## Acquire GCP Access Credentials The installation of Terraform on your Desktop/Laptop needs to communicate with GCP. Thus, Terraform needs to be authenticated. To obtain GCP user credentials, follow this [guide](/install-guides/gcloud/#acquire-user-credentials). -### Terraform infrastructure +## Terraform infrastructure Add resources required to create a VM in `main.tf`. Add below code in `main.tf` file: @@ -64,9 +64,9 @@ resource "google_compute_instance" "vm_instance" { Replace `project_ID` with your value which can be found in the [Dashboard](https://console.cloud.google.com/home?_ga=2.56408877.721166205.1675053595-562732326.1671688536&_gac=1.125526520.1675155465.CjwKCAiAleOeBhBdEiwAfgmXfwdH3kCFBFeYzoKSuP1DzwJq7nY083_qzg7oyP2gwxMvaE0PaHVgFhoCmXoQAvD_BwE) of Google Cloud console. {{% /notice %}} -### Terraform commands +## Terraform commands -#### Initialize Terraform +### Initialize Terraform Run `terraform init` to initialize the Terraform deployment. This command downloads all the modules required to manage your resources. ``` @@ -100,7 +100,7 @@ rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary. ``` -#### Create a Terraform execution plan +### Create a Terraform execution plan Run `terraform plan` to create an execution plan. ``` @@ -109,7 +109,7 @@ Run `terraform plan` to create an execution plan. A long output of resources to be created will be printed. -#### Apply a Terraform execution plan +### Apply a Terraform execution plan Run `terraform apply` to apply the execution plan to your cloud infrastructure. Below command creates all required infrastructure. ``` @@ -132,7 +132,7 @@ In the Google Cloud console, go to the [VM instances page](https://console.cloud ![terraform4 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/40816837/320b4c6f-0d2b-44f3-9517-dc427d82a018) -### SSH into the launched instance +## SSH into the launched instance Run following command to connect to VM through SSH: diff --git a/content/learning-paths/servers-and-cloud-computing/migration/golang.md b/content/learning-paths/servers-and-cloud-computing/migration/golang.md index 81826d09d8..d8f5da78dc 100644 --- a/content/learning-paths/servers-and-cloud-computing/migration/golang.md +++ b/content/learning-paths/servers-and-cloud-computing/migration/golang.md @@ -8,7 +8,7 @@ layout: "learningpathall" --- -## Go on Arm Neoverse processors +# Go on Arm Neoverse processors [Go](https://go.dev/) is a statically typed, compiled programming language supported by Google. diff --git a/content/learning-paths/servers-and-cloud-computing/migration/java.md b/content/learning-paths/servers-and-cloud-computing/migration/java.md index 3c27026e06..f49d1bdd12 100644 --- a/content/learning-paths/servers-and-cloud-computing/migration/java.md +++ b/content/learning-paths/servers-and-cloud-computing/migration/java.md @@ -8,17 +8,19 @@ layout: "learningpathall" --- -## Java on Arm Neoverse processors +# Java on Arm Neoverse processors Java is a general-purpose, high-level programming language used in a wide variety of applications. -Java code is usually compiled to bytecode that runs on a Java virtual machine (JVM) making it portable across computer architectures. +Java code is typically compiled to bytecode that runs on a Java virtual machine (JVM) making it portable across computer architectures. -There are many ways to install Java on Arm Linux distributions. For more information, see the [Java install guide](/install-guides/java/). +There are many ways to install Java on Arm Linux distributions. Refer to the [Java install guide](/install-guides/java/) for information about how to install Java. + +# How can I increase Java performance on Arm? Java runs well on Arm, but there are some things to investigate to make sure you are getting the best performance. -## JVM flags that impact performance +## Which JVM flags impact performance? The JVM includes a number of flags which are available to tune performance and aid in debugging. Some of the flags are general purpose and some are Arm architecture specific. @@ -28,7 +30,7 @@ To print the final values of the flags after the JVM has been initialized run: java -XX:+PrintFlagsFinal -version ``` -Use the output from the previous command to see the current values before making any changes. +Use the output from the above command to see the current values before making any changes. For example, to check the value of `CICompilerCount` run: @@ -56,7 +58,7 @@ The `-XX:CompilationMode` flag instructs the JIT compiler to to use highest opti The best way to determine optimal values for your application is to test your application with different values. -#### Architecture flags +### Architecture flags There are flags that are specific to the Arm architecture and indicate if a particular hardware feature is used. You can see all the flags by running: From a0a885fceee8db6f89f41afa95d5f3aa62c15d6c Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 13:56:56 -0500 Subject: [PATCH 09/10] expanding on GCP --- .../opencv-on-axion/opencv-ml-streaming-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index 539fc9c9d6..d005547af2 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -290,7 +290,7 @@ Check that the HTTP server is running: python -m http.server 8000 & ``` -Also make sure port `8000` is allowed in the GCP firewall. +Also make sure port `8000` is allowed in the Google Cloud Platform firewall. #### Output image does not update From 79b558b240167f6294498027fb2b79f146b77b10 Mon Sep 17 00:00:00 2001 From: anupras-mohapatra-arm Date: Tue, 12 May 2026 16:13:51 -0500 Subject: [PATCH 10/10] updating case for random forest classifier in prose --- .../opencv-on-axion/opencv-ml-streaming-pipeline.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md index d005547af2..ea527ad609 100644 --- a/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md +++ b/content/learning-paths/servers-and-cloud-computing/opencv-on-axion/opencv-ml-streaming-pipeline.md @@ -80,7 +80,7 @@ joblib imported successfully ### Train an ML model -The training script uses the Iris dataset — a standard benchmark dataset with 150 samples across three flower species — and trains a Random Forest classifier. The trained model and label names are saved to disk with `joblib` so the OpenCV pipeline can load them without retraining. +The training script uses the Iris dataset — a standard benchmark dataset with 150 samples across three flower species — and trains a random forest classifier. The trained model and label names are saved to disk with `joblib` so the OpenCV pipeline can load them without retraining. ```bash cat > train_ml_model.py <<'EOF' @@ -310,4 +310,4 @@ rm -f iris_model.joblib iris_labels.joblib ml_output.jpg ## What you've accomplished -You've trained a Random Forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a Google Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — mirrors production vision pipelines, where models are updated independently of the display layer. +You've trained a random forest classifier on the Iris dataset, saved it with `joblib`, and loaded it inside an OpenCV pipeline to generate a browser-viewable prediction image on a Google Axion Arm64 VM. This pattern — train offline, load at inference time, render output with OpenCV — mirrors production vision pipelines, where models are updated independently of the display layer.