前置条件

  • 架构: x86_64
  • 芯片型号: Kunlunxin P800
  • 宿主机驱动: 5.37.1
  • 容器工具包 (可选) : xpu_container >= 1.0.13

镜像内容

基于

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

Python

3.10

应用软件包

vllm==0.20.2+flagos

vllm-plugin-fl==0.2.2

环境变量

  • VLLM_FL_PLATFORM=kunlunxin
  • VLLM_FL_PREFER=flagos
  • USE_FLAGGEMS=1
  • VLLM_FL_FLAGOS_WHITELIST=silu_and_mul,rms_norm,rotary_embedding

启动

已发布: harbor.baai.ac.cn/flagos-app/vllm0.20.2-kunlunxin-xre5.37.1:2.2.0-0.2.2

镜像名较长——先将其设为变量:

  IMG=harbor.baai.ac.cn/flagos-app/vllm0.20.2-kunlunxin-xre5.37.1:2.2.0-0.2.2
  

以下两种方式任选其一:

使用容器工具包

启动交互式 shell:

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

以默认设置启动应用:

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

向启动器传参:

  docker run --rm -it \
  --runtime xpu \
  -e CXPU_VISIBLE_DEVICES=0 \
  $IMG vllm-serve --model <path> --port 9000
  

无需工具包——直接使用 docker / podman

启动交互式 shell:

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

以默认设置启动应用:

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

向启动器传参:

  docker run --rm -it \
  --device /dev/xpu0 \
  --device /dev/xpuctrl \
  $IMG vllm-serve --model <path> --port 9000
  

Last updated 28 Sep 2026, 14:32 +0800. history