Installing and Using Metax GPU Components¶
This section provides guidance on installing the Metax components—gpu-extensions
, gpu-operator
, etc.—as well as instructions for using Metax GPUs in both full-card and vGPU modes.
Prerequisites¶
- Download and install the required tar package from the Metax Software Center. This document uses
metax-gpu-k8s-package.0.7.10.tar.gz
as an example. - Prepare a basic Kubernetes environment.
Component Overview¶
Metax provides two Helm chart packages: metax-extensions
and gpu-operator
. Choose which to install based on your usage scenario.
- metax-extensions: Contains the
gpu-device
andgpu-label
components. When using this approach, application container images must be built based on the MXMACA® base image. This solution only supports full GPU usage. - gpu-operator: Contains components such as
gpu-device
,gpu-label
,driver-manager
,container-runtime
, andoperator-controller
. With this approach, application images do not need to include the MXMACA® SDK, and it supports both full GPU and vGPU modes.
Installation Steps¶
-
Extract the contents from the tar file:
From
/home/metax/metax-docs/k8s/metax-gpu-k8s-package.0.7.10.tar.gz
, extract:deploy-gpu-extensions.yaml
– deployment YAML filemetax-gpu-extensions-0.7.10.tgz
,metax-operator-0.7.10.tgz
– Helm chart packagesmetax-k8s-images.0.7.10.run
– offline image archive
-
Check if the driver is already installed:
$ lsmod | grep metax metax 1605632 0 ttm 86016 3 drm_vram_helper,metax,drm_ttm_helper drm 618496 7 drm_kms_helper,drm_vram_helper,ast,metax,drm_ttm_helper,ttm
- If no output appears, the driver is not installed.
- If output appears, the driver is already installed.
- When using
gpu-operator
, it is not recommended to pre-install the MXMACA kernel driver on worker nodes. If already installed, you do not need to uninstall it.
-
Install the driver
Installing gpu-extensions
¶
-
Push images:
-
Push Helm charts:
-
Install
metax-gpu-extensions
on the DCE 5.0 platform.After successful deployment, you can verify the resources on the nodes:
-
Once configured, nodes will be labeled with
Metax GPU
:
Installing gpu-operator
¶
Known issues when installing gpu-operator
:
- The images for
metax-operator
,gpu-label
,gpu-device
, andcontainer-runtime
must include theamd64
suffix. - The
metax-maca
component image is not included in themetax-k8s-images.0.7.13.run
package. You must manually download images likemaca-mxc500-2.23.0.23-ubuntu20.04-x86_64.tar.xz
, load them, and update themetax-maca
component image accordingly. -
The
metax-driver
image needs to be downloaded fromhttps://pub-docstore.metax-tech.com:7001
ask8s-driver-image.2.23.0.25.run
. Then run:to push it to your image registry, and update the
metax-driver
image reference accordingly.
Using the GPU¶
After installation, you can use the Metax GPU in workloads. When enabling GPU support, be sure to select Metax GPU as the GPU type.
To check GPU usage, enter the container and run mx-smi
.