Prerequisites

  • Architecture: x86_64
  • Chip models: Kunlunxin P800
  • Host driver: 5.37.1
  • Container toolkit (optional) : xpu_container >= 1.0.13

Image contents

Built on

harbor.baai.ac.cn/flagos-runtime/flagos-runtime-kunlunxin-xre5.37.1:2.2.0 open_in_new

Python

3.10

Application package

megatron-core[training]==0.17.1

Launch

Published: harbor.baai.ac.cn/flagos-app/megatron_training0.17.1-kunlunxin-xre5.37.1:2.2.0-0.2.3

The image name is long — assign it to a variable first:

  IMG=harbor.baai.ac.cn/flagos-app/megatron_training0.17.1-kunlunxin-xre5.37.1:2.2.0-0.2.3
  

The two approaches below are alternatives — pick the one that matches how your host runs containers:

With the container toolkit

Start an interactive shell:

  docker run --rm -it \
  --runtime xpu \
  -e CXPU_VISIBLE_DEVICES=0 \
  $IMG bash
  

Start the app with its default settings:

  docker run --rm -it \
  --runtime xpu \
  -e CXPU_VISIBLE_DEVICES=0 \
  $IMG
  

Pass arguments to the launcher:

  docker run --rm -it \
  --runtime xpu \
  -e CXPU_VISIBLE_DEVICES=0 \
  $IMG megatron-train --model-type GPT
  

Without a toolkit — plain docker / podman

Start an interactive shell:

  docker run --rm -it \
  --device /dev/xpu0 \
  --device /dev/xpuctrl \
  $IMG bash
  

Start the app with its default settings:

  docker run --rm -it \
  --device /dev/xpu0 \
  --device /dev/xpuctrl \
  $IMG
  

Pass arguments to the launcher:

  docker run --rm -it \
  --device /dev/xpu0 \
  --device /dev/xpuctrl \
  $IMG megatron-train --model-type GPT
  

Last updated 24 Sep 2026, 13:40 +0800. history