Sign inSign up

ascendai/npu-exporter

By ascendai

•Updated 11 days ago

Image
0

2.2K

ascendai/npu-exporter repository overview

⁠Cluster Scheduling Component NPU Exporter

⁠Quick Reference


⁠NPU Exporter

NPU Exporter is one of the MindCluster cluster scheduling components, deployed on compute nodes. It reports various chip data metrics and supports two monitoring integration methods: Prometheus and Telegraf.

⁠Use Cases

During job execution, in addition to chip faults, it is often necessary to monitor chip network and computing utilization to identify performance bottlenecks and find directions for improving job performance. MindCluster provides the NPU Exporter component deployed on compute nodes for reporting various chip data metrics.

⁠Features
  • Retrieves various chip and network data metrics from the driver.
  • Adapts Prometheus hook functions, providing standard interfaces for Prometheus services to call.
  • Adapts Telegraf hook functions, providing standard interfaces for Telegraf services to call.
  • Supports real-time monitoring of Atlas AI processor utilization, temperature, voltage, memory, and other data metrics.
  • Supports monitoring of virtual NPU (vNPU) AI Core utilization, vNPU total memory, and vNPU used memory.
  • Supports custom metric development. Users can refer to the provided demo to develop custom metric plugins.
⁠Upstream and Downstream Dependencies
  1. Retrieves chip and network information from the driver and stores it in a local cache.
  2. Retrieves container information from the Kubernetes standard CRI interface and stores it in a local cache.
  3. Implements Prometheus or Telegraf interfaces for them to periodically retrieve cached data metrics.

⁠Tag Convention

Starting from version v26.1.0, tags follow the format below:

<version>-<os>
FieldExampleDescription
versionv26.1.1Version Number of NPU Exporter
osubuntu22.04Operating System for NPU Exporter Images
⁠NPU Exporter Latest Version 26.1.1

The following are all images of the latest released 26.1.1 version of NPU Exporter. For all historical version Tags, please refer to Supported Tags⁠.

TagDockerfileImage Content
v26.1.1-ubuntu22.04Dockerfile.ubuntu⁠NPU Exporter v26.1.1 (Base Image: Ubuntu 22.04)
v26.1.1-openeuler24.03Dockerfile.openeuler⁠NPU Exporter v26.1.1 (Base Image: openEuler 24.03)

The tags of versions before v26.1.0 follow the format below:

<version>
FieldExampleDescription
versionv26.0.0Version Number of NPU Exporter
⁠NPU Exporter 26.0.0
TagDockerfileImage Content
v26.0.0Dockerfile⁠NPU Exporter v26.0.0 (Base Image: Ubuntu 22.04)

⁠Quick Start

⁠Prerequisites
⁠Software Dependencies
SoftwareSupported VersionsInstallation LocationDescription
Kubernetes1.17.x~1.34.x (1.19.x or later recommended)All nodesSee Kubernetes Documentation⁠
PrometheusLatest stable version recommendedMonitoring nodesNPU Exporter adapts Prometheus hook functions to provide monitoring data
Atlas AI Processor Driver and FirmwareSee version compatibility tableCompute nodesSee "Installing NPU Driver and Firmware" in the CANN Software Installation Guide
UMDK software packageSee version compatibility tableCompute nodesNecessary for Atlas 850、Atlas 950 SuperPod Products
⁠Hardware Requirements
ResourceRequirement
CPU1 core
Memory1 GB
⁠Obtain NPU Exporter Image Online
  1. Pull the official image

    Pull the NPU Exporter image from AscendHub, replacing {tag} with the actual version.

    docker pull swr.cn-south-1.myhuaweicloud.com/ascendhub/npu-exporter:{tag}
    
  2. Retag the image

    Retag the official image with a local tag for consistent naming and easier operations management.

    docker tag swr.cn-south-1.myhuaweicloud.com/ascendhub/npu-exporter:{tag} npu-exporter:{tag}
    
⁠Build Locally (Optional)
⁠Local Build Steps for v26.1.0 and Later Versions

Example: build an NPU Exporter image of architecture linux-aarch64, version v26.1.1, based on Ubuntu 22.04.

  1. Obtain the target Dockerfile

    Navigate to the chapter Supported Tags and Dockerfile Links, open the Dockerfile.ubuntu link corresponding to your target version, and save the file to a local directory on your aarch64 environment.

  2. Build the Docker image locally (disable cache to ensure a clean build)

    docker build --no-cache -t npu-exporter:v26.1.1 ./ -f Dockerfile.ubuntu
    

Important Notes If your Docker version is earlier than 18.09 or BuildKit is not manually enabled, the TARGETPLATFORM variable cannot be read during image building, which will cause the image build to fail.

  1. TARGETPLATFORM is a built-in global variable of Docker BuildKit for identifying the target build platform, e.g. linux/amd64, linux/arm64.
  2. This variable is automatically injected only after BuildKit is enabled. It cannot be used in legacy Docker environments or environments where BuildKit is disabled by default.
  3. Run the following command before building to enable BuildKit temporarily:
export DOCKER_BUILDKIT=1
⁠Local Image Build Process for Versions Before v26.1.0

Example: Build an NPU Exporter image of architecture linux-aarch64, version v26.0.0, based on Ubuntu 22.04.

  1. Download the officially released component package

    wget https://gitcode.com/Ascend/mind-cluster/releases/download/v26.0.0/Ascend-mindxdl-npu-exporter_26.0.0_linux-aarch64.zip
    
  2. Extract the package to a custom directory

    unzip Ascend-mindxdl-npu-exporter_26.0.0_linux-aarch64.zip -d Ascend-mindxdl-npu-exporter_26.0.0_linux-aarch64
    
  3. Enter the extracted working directory

    cd Ascend-mindxdl-npu-exporter_26.0.0_linux-aarch64
    
  4. Build the Docker image locally (disable cache to ensure a clean build)

    docker build --no-cache -t npu-exporter:v26.0.0 ./ -f Dockerfile
    
⁠Deploy NPU Exporter
  1. Label Kubernetes nodes

    Add labels to the corresponding nodes for cluster scheduling matching. Replace <node-name> with the actual node name.

    kubectl label nodes <node-name> workerselector=dls-worker-node
    
  2. Start NPU Exporter

    Before deployment, replace the image {tag} in the YAML file with the actual image version.

    kubectl apply -f npu-exporter-{version}.yaml
    
  3. Verify deployment

    kubectl get pods -A | grep npu-exporter
    

    Expected result: The npu-exporter related Pods in the corresponding namespace should be in Running state.

  4. Access monitoring metrics

    curl http://<pod-ip>:8082/metrics
    

⁠License

View the license information⁠ for the Mind series software contained in these images.

As with all container images, pre-installed software packages (Python, system libraries, etc.) may be subject to their respective license agreements.

Tag summary

Content type

Image

Digest

sha256:32d9411e5…

Size

43.1 MB

Last updated

11 days ago

docker pull ascendai/npu-exporter:v26.1.1-ubuntu22.04