README.md

InferNex Bridge

InferNex 接入 KServe 的适配层,支持双 CRD 声明式部署

Docs License Helm KServe


Overview

InferNex Bridge 是 InferNex 接入 KServe 的适配层(Controller + Webhook),根据 LLMInferenceService / InferNexService 声明,自动部署并调和 InferNex 推理套件。

提供两种部署形式:

  • KServe LLMInferenceService + InferNex Bridge:推理 Engine / Hermes 路由由 KServe 部署,增强组件由 InferNex Bridge 部署。
  • InferNex Bridge InferNexService:不经过 KServe,由 InferNex Bridge 统一编排推理 Engine、Hermes 路由及增强组件。

InferNex 主 chart 的一键 Helm 全栈安装为不同入口。

增强组件能力范围与 InferNex 集成部署用户手册 一致。架构与责任边界见 OFEP-0040 InferNex 接入 KServe 适配层提案InferNex Bridge 技术规格说明文档

Quick Start

Prerequisites

  • Kubernetes 集群,kubectl、Helm v3+。
  • 推理集群:NPU Operator、LWS 等,详见 InferNex 用户手册 — 前提条件
  • KServe LLMInferenceService 路径:须安装 KServe(版本 0.17.0–0.19.0,须支持 LLMInferenceService)。
  • InferNex Bridge InferNexService 路径:不依赖 KServe。
  • 网关访问:Envoy Gateway 及 Gateway API、GIE 相关 CRD。

Binary Deployment

以命名空间 infernex-bridge-system、release 名称 infernex-bridge 为例,执行:

helm upgrade --install infernex-bridge oci://cr.openfuyao.cn/charts/infernex-bridge \
  --version 0.0.0-latest \
  -n infernex-bridge-system --create-namespace --wait --timeout 10m

其中 0.0.0-latest 需替换为具体 Chart 版本。

Source Deployment

  1. 从仓库拉取项目。

    git clone https://gitcode.com/openFuyao/InferNex.git
    
  2. 安装 InferNex Bridge。

    以命名空间 infernex-bridge-system、release 名称 infernex-bridge 为例,在 InferNex/component/InferNex-Bridge 目录下执行如下命令:

    cd InferNex/component/InferNex-Bridge
    helm upgrade --install infernex-bridge ./chart/infernex-bridge \
      -n infernex-bridge-system --create-namespace --wait --timeout 10m
    

Verify Deployment

  1. 确认 Controller Pod 与 Service 已就绪。

    kubectl get pods,svc -n infernex-bridge-system
    
  2. 确认 Mutating / Validating Webhook 已注册。

    kubectl get mutatingwebhookconfiguration,validatingwebhookconfiguration | grep infernex-bridge
    
  3. 等待 Webhook 与证书就绪,而后部署 InferNex。

安装参数、卸载及 InferNex 部署详见 InferNex Bridge 用户手册

Deploy InferNex

InferNex Bridge 安装并验证通过后,config/examples/ 下选取示例 YAML,用 kubectl apply 提交即可部署 InferNex

  1. 选择示例文件

    按所选部署方式,以及目标部署架构(聚合 / P/D),从下表选取对应示例:

    场景 示例文件
    KServe LLMInferenceService + InferNex Bridge · 聚合 aggregate_llmisvc_no_storage_initializer_example.yaml
    KServe LLMInferenceService + InferNex Bridge · P/D pd_llmisvc_no_storage_initializer_example.yaml
    InferNex Bridge InferNexService · 聚合 aggregate_infernexservice_example.yaml
    InferNex Bridge InferNexService · P/D pd_infernexservice_example.yaml
    • KServe LLMInferenceService + InferNex Bridge:选 LLMInferenceService 示例(示例中已设置 infernex.io/runtime: "true")。
    • InferNex Bridge InferNexService:选 InferNexService 示例(含 InferNexServiceInferNexServiceConfig)。
  2. 提交 YAML

    cd InferNex/component/InferNex-Bridge/config/examples
    kubectl apply -f <example>.yaml
    

    <example>.yaml 替换为上表中的文件名。如需自定义参数,可基于示例修改后再 apply。