Prerequisites

  • Architecture: x86_64
  • Chip models: MThreads MTT S5000
  • Host driver: 5.2.0-server
  • Container toolkit (optional) : KUAE Cloud Native Toolkits (MT Container Toolkit) >= 2.1.0

Image contents

Built on

harbor.baai.ac.cn/flagos-runtime/flagos-runtime-mthreads-musa5.2.0:2.2.0 open_in_new

Python

3.10

Application package

sglang==0.5.18+flagos

sglang-fl==0.1.dev1+g607b9672c

Launch

Published: harbor.baai.ac.cn/flagos-app/sglang0.5.18-mthreads-musa5.2.0:2.2.0-0.1.dev1_g607b9672c

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

  IMG=harbor.baai.ac.cn/flagos-app/sglang0.5.18-mthreads-musa5.2.0:2.2.0-0.1.dev1_g607b9672c
  

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 mthreads \
  --env MTHREADS_VISIBLE_DEVICES=all \
  $IMG bash
  

Start the app with its default settings:

  docker run --rm -it \
  --runtime mthreads \
  --env MTHREADS_VISIBLE_DEVICES=all \
  $IMG
  

Pass arguments to the launcher:

  docker run --rm -it \
  --runtime mthreads \
  --env MTHREADS_VISIBLE_DEVICES=all \
  $IMG sglang-serve --model-path <path> --port 9000
  

Without a toolkit — plain docker / podman

Start an interactive shell:

  docker run --rm -it \
  --device /dev/mtgpu.0 \
  --device /dev/dri \
  -v /usr/bin/mthreads-gmi:/usr/bin/mthreads-gmi:ro \
  $IMG bash
  

Start the app with its default settings:

  docker run --rm -it \
  --device /dev/mtgpu.0 \
  --device /dev/dri \
  -v /usr/bin/mthreads-gmi:/usr/bin/mthreads-gmi:ro \
  $IMG
  

Pass arguments to the launcher:

  docker run --rm -it \
  --device /dev/mtgpu.0 \
  --device /dev/dri \
  -v /usr/bin/mthreads-gmi:/usr/bin/mthreads-gmi:ro \
  $IMG sglang-serve --model-path <path> --port 9000
  

Last updated 29 Sep 2026, 18:53 +0800. history