安装 Alauda AI Platform

Alauda AI Platform 通过 Alauda AI Platform Operator 提供模型管理、推理、训练和 MLOps 功能。自动创建的 default AmlCluster 实例控制集群中启用的组件。默认情况下,Alauda AI Platform 使用 KServe Standard 模式作为推理后端,特别推荐用于资源密集型生成式工作负载。此模式利用 Kubernetes 的基础功能,提供简单直接的模型部署方式,以及强大且可自定义的部署能力。

包括将推理服务扩展到零的 Knative 功能在内的可选功能,可通过更新 AmlCluster 实例中的组件开关来启用。所需的 operator 和 operand 会根据这些设置自动安装。

INFO

推荐的部署选项:对于生成式推理工作负载,推荐采用 Standard 方法(之前称为 RawKubernetes Deployment),因为该方法可对资源分配和扩展进行最精细的控制。

下载软件包

有关下载安装软件包和 violet 工具的通用操作步骤,请参阅上架软件包。

Alauda AI Platform 所需的软件包如下:

  • Alauda AI Platform — 用于模型管理、推理服务和组件生命周期管理的主要平台组件。

下载与 Alauda AI Platform 版本和目标集群架构匹配的软件包版本。

前提条件

下面列出的依赖组件以软件包形式提供。无需在目标集群上单独安装这些组件——在安装 Alauda AI Platform 之前,将其软件包上传到平台仓库;Alauda AI Platform 安装后,AmlCluster 会安装并管理这些组件。

默认情况下需要以下组件:

  • PostgreSQL
  • Alauda Cache Service for Redis OSS
  • Alauda Build of Authorino
  • Alauda AI Platform Gateway
  • Alauda AI Platform Inference Management
  • Alauda Build of LeaderWorkerSet

上架软件包

将 Alauda AI Platform 软件包上传到将运行 Alauda AI Platform 的集群。按照上架软件包中的说明准备 violet、配置平台或外部 registry 凭据,并上传软件包。

上传软件包后,按照以下说明从 OperatorHub 安装 Alauda AI Platform。安装后,通过 AmlCluster 组件配置启用可选功能。

安装 Alauda AI Platform

操作步骤

在管理员视图中:

  1. 单击 Marketplace / OperatorHub。

  2. 在控制台顶部,从 Cluster 下拉列表中选择要安装 Alauda AI Platform 的目标集群。

  3. 选择 Alauda AI Platform,然后单击 Install。

    此时将弹出 Install Alauda AI Platform 窗口。

  4. 然后在 Install Alauda AI Platform 窗口中:

  5. 保持 Channel 不变。

  6. 检查 Version 是否与要安装的 Alauda AI Platform 版本匹配。

  7. 保持 Installation Location 不变,该项默认为 aml-operator。

  8. 对于 Upgrade Strategy,选择 Manual。

  9. 单击 Install。

验证

确认 Alauda AI Platform 磁贴显示以下状态之一:

  • Installing:安装正在进行;等待其变为 Installed。
  • Installed:安装已完成。

配置 Alauda AI Platform 实例

Alauda AI Platform 安装完成后,operator 会自动创建集群范围的 default AmlCluster 实例。无需手动创建 default 实例。请根据您的环境检查并更新自动创建的实例。

部署 Alauda AI Platform

在 Administrator 视图中:

  1. 单击 Marketplace / OperatorHub。

  2. 在控制台顶部,从 Cluster 下拉列表中选择要安装 Alauda AI Platform Operator 的目标集群。

  3. 选择 Alauda AI Platform,然后单击它。

  4. 在 Alauda AI Platform 页面中,单击选项卡中的 All Instances。

  5. 等待 default AmlCluster 实例出现,然后对其进行编辑。

  6. 从下拉列表中选择 Deploy Flavor:

    1. 非 HA 部署选择 single-node。
    2. HA 集群部署选择 ha-cluster(生产环境推荐)。
  7. 在 Domain 字段中输入有效的域名。

    INFO

    此域名由 ingress gateway 使用,用于公开模型服务。

    您可能需要使用泛域名,例如 *.example.com。

    更新 Domain Certificate Type 字段可指定以下证书类型:

    • Provided
    • SelfSigned
    • ACPDefaultIngress

    默认情况下,配置使用 SelfSigned 证书类型来保护发往集群的 ingress 流量。证书存储在 Domain Certificate Secret 字段指定的 knative-serving-cert Secret 中。

组件管理状态

Alauda AI Platform 2.9 会自动安装和管理由 AmlCluster 配置选择的组件。以下值显示默认组件设置。将所需条目合并到现有的 default AmlCluster 中;不要创建第二个实例。

spec:
  components:
    authorino:
      managementState: Managed
    envoyAIGateway:
      managementState: Unmanaged
    envoyGateway:
      managementState: SharedManaged
    feast:
      managementState: Unmanaged
    infernexBridge:
      managementState: Unmanaged
    knativeServing:
      managementState: Unmanaged
      providerType: Operator
    lws:
      managementState: Managed
    mlflow:
      managementState: Unmanaged
    npuOperator:
      managementState: Unmanaged
      values:
        clusterd:
          enabled: false
        devicePlugin:
          enabled: true
        driver:
          enabled: true
          recoveryPolicy:
            autoRecover: false
          upgradePolicy:
            autoUpgrade: false
          version: 25.5.0
        exporter:
          enabled: true
        mindioacp:
          enabled: false
        mindiotft:
          enabled: false
        nodeD:
          enabled: false
        ociRuntime:
          enabled: true
        rscontroller:
          enabled: false
        trainer:
          enabled: false
    postgres:
      managementState: SharedManaged
    redis:
      managementState: SharedManaged
    servingRuntimeNPUOperator:
      managementState: Unmanaged
    servingRuntimeOperator:
      managementState: Unmanaged
    trustyAI:
      managementState: Unmanaged
    workbench:
      managementState: Unmanaged
      values:
        global:
          istio:
            enabled: false

spec.components 字段使用与以下产品和 Operator 对应的配置键:

组件键产品或 Operator
authorinoAlauda Build of Authorino
envoyAIGatewayAlauda AI Platform Gateway
envoyGatewayAlauda Build of Envoy Gateway (SharedManaged)
feastAlauda Build of Feast
infernexBridgeAlauda Build of InferNex Bridge
knativeServingKnative Serving
lwsAlauda Build of LeaderWorkerSet
mlflowMLflow
npuOperatorAlauda Build of NPU Operator
postgresPostgreSQL (SharedManaged)
redisAlauda Cache Service for Redis OSS (SharedManaged)
servingRuntimeNPUOperatorAlauda AI Platform NPU Serving Runtime
servingRuntimeOperatorAlauda AI Platform Serving Runtime
trustyAIAlauda Build of TrustyAI
workbenchAlauda AI Workbench

管理状态含义如下:

值含义
ManagedAlauda AI Platform 管理该组件及其生命周期。对于常规安装,请使用 Managed,以便 Alauda AI Platform 安装并协调该组件。
UnmanagedAlauda AI Platform 不会安装或协调该组件。仅在临时变通方案、兼容性要求或高级部署中使用此值;如有需要,请单独管理该组件。
SharedManagedAlauda AI Platform 部署该组件供共享使用,但不会锁定 Operator 版本。
RemovedAlauda AI Platform 会移除该组件及其所管理的资源。对于状态为 SharedManaged 的组件,不能使用此值;请改为将这些组件设置为 Unmanaged。

将适用于硬件的设置合并到现有的 default AmlCluster 中,以启用可选组件。请根据加速器选择相应的 serving runtime,不要不加区分地同时启用两个 runtime operator。

NVIDIA GPU / x86:启用 Alauda AI Platform Serving Runtime。版本 v1.2.2 包含 vLLM v0.23.0;llm-d 工作负载会复用 vLLM 镜像,而不使用单独的 llm-d 镜像。

spec:
  components:
    servingRuntimeOperator:
      managementState: Managed

搭配 InferNex Bridge 的 Ascend NPU:启用 Alauda Build of InferNex Bridge 和 Alauda AI Platform NPU Serving Runtime。NPU runtime 提供 vLLM-Ascend v0.23.0 镜像、ClusterServingRuntime 和 LLMInferenceServiceConfig 资源。在此部署路径中,请勿启用 NVIDIA/x86 servingRuntimeOperator。

spec:
  components:
    infernexBridge:
      managementState: Managed
    servingRuntimeNPUOperator:
      managementState: Managed

其他可选功能:根据需要启用 gateway 或 Workbench,不受 serving runtime 选择的影响:

spec:
  components:
    envoyAIGateway:
      managementState: Managed
    workbench:
      managementState: Managed

Llama Stack 已弃用,2.9 中不再由 AmlCluster 管理。可考虑使用 Ogx 作为替代方案;AmlCluster 不会安装或管理 Ogx。

INFO

启用 Knative 功能

在现有的 default AmlCluster 中,将 spec.components.knativeServing.managementState 设置为 SharedManaged:

spec:
  components:
    knativeServing:
      managementState: SharedManaged

配置 KServe

Alauda AI Platform Inference Management 由 Alauda AI Platform 安装和管理。default AmlCluster 实例中的 kserve 组件默认值为 Managed,因此 Alauda AI Platform 会安装 KServe Operator 并自动创建 KServe 实例。您无需上传 KServe Operator 软件包、从 OperatorHub 安装 Operator,也无需手动创建 KServe 自定义资源。

KServe 参数通过 spec.components.kserve.values 暴露。将所需设置合并到现有的 default AmlCluster 中:

spec:
  components:
    kserve:
      managementState: Managed
      values:
        defaultDeploymentMode: RawDeployment
        domain: example.com
        ingressGateway: knative-serving/knative-ingress-gateway
        kserve:
          storage:
            uidModelcar: 1000
        preset:
          envoyAIGateway:
            port: 1063
            service: ai-gateway-controller
          envoyGateway:
            createInstance: true
            deployType: ControllerNamespace
            instanceName: aieg
            saNamespace: envoy-gateway-system
            serviceAccount: envoy-gateway
          gie:
            enabled: true
          kserveGateway:
            enabled: true
            name: kserve-ingress-gateway
            namespace: kserve
            port: 80
            service_type: NodePort

主要的 kserve 组件设置:

字段描述默认值
managementStateAlauda AI Platform 是否管理 KServe Operator 和实例。常规安装请使用 Managed。Managed
values.defaultDeploymentMode推理服务的部署模式:RawDeployment(Standard),或用于缩容至零等无服务器功能的 Knative。RawDeployment
values.domainingress gateway 用于公开推理服务端点的域名。请使用泛域名,例如 *.example.com。None
values.ingressGateway绑定到 KServe 的 ingress gateway,格式为 <namespace>/<gateway-name>。knative-serving/knative-ingress-gateway
values.kserve.storage.uidModelcarModelcar 工作负载使用的 UID。对于非 root 工作负载,保留默认值 1000;仅当经过验证的 vLLM-ascend 多 NPU 部署需要 root 模式时,才设置为 0。1000

gateway 预设用于配置承载推理流量的 AI gateway 堆栈:

字段描述默认值
preset.envoyGateway.createInstance创建 Envoy Gateway 实例,以通过捆绑扩展管理推理流量。true
preset.envoyGateway.instanceName要创建的 Envoy Gateway 实例名称。aieg
preset.envoyGateway.saNamespaceEnvoy Gateway service account 所在的命名空间。envoy-gateway-system
preset.envoyGateway.serviceAccountEnvoy Gateway 使用的 service account 名称。envoy-gateway
preset.envoyAIGateway.serviceAlauda AI Platform Gateway 的 Kubernetes service 名称。ai-gateway-controller
preset.envoyAIGateway.portAlauda AI Platform Gateway 使用的端口号。1063
preset.gie.enabled启用捆绑的 Gateway API Inference Extension。如果集群中已单独安装 GIE,请设置为 false。true
preset.kserveGateway.enabled为 InferenceService 流量部署 KServe Gateway 实例。true
preset.kserveGateway.nameKServe Gateway 的名称。kserve-ingress-gateway
preset.kserveGateway.namespaceKServe Gateway 部署所在的命名空间。kserve
preset.kserveGateway.portKServe Gateway 使用的端口号。80
preset.kserveGateway.service_typeKServe Gateway 的 service 类型。NodePort

验证 AmlCluster 是否已协调,以及 Alauda AI Platform 是否已创建 KServe 实例:

kubectl get amlcluster default

kubectl get kserve default-kserve -n kserve-operator

AmlCluster 应报告 Phase=Ready 和 Reason=Reconciled;当状态显示 DEPLOYED: True 时,KServe 实例即已就绪。

配置自定义 OIDC provider(可选)

默认情况下,Alauda AI Platform 使用 ACP Dex 作为 OIDC provider。在此默认设置中,无需在 AmlCluster 实例中进行额外的 spec.oidc 配置。

如果希望 Alauda AI Platform 使用其他 OIDC provider,请在该 provider 中注册 OAuth2/OIDC 客户端,允许 Alauda AI Platform 回调 URL,然后更新 AmlCluster YAML 中的 spec.oidc。回调 URL 为:

https://<platform-address>/clusters/<cluster-name>/aml/oauth2/callback

Alauda AI Platform 会从 Alauda AI Platform 安装集群 kubeflow 命名空间中的 Kubernetes Secret 读取 OIDC 客户端 Secret。默认 Secret 名称为 aml-oidc-secret,Secret 键必须为 client-secret。请使用 OIDC provider 提供的客户端 Secret 更新此 Secret:

kubectl create secret generic aml-oidc-secret \
  -n kubeflow \
  --from-literal=client-secret='<oidc-client-secret>' \
  --dry-run=client -o yaml | kubectl apply -f -

然后配置 spec.oidc:

spec:
  oidc:
    # OIDC issuer URL. This must match the issuer value advertised by the
    # provider, for example a Keycloak realm URL.
    issuerURL: https://<oidc-provider-issuer>
    # OAuth2/OIDC client ID registered in the external provider.
    clientID: <oidc-client-id>
    # Kubernetes Secret name in the kubeflow namespace. The Secret must
    # contain a client-secret key. Default: aml-oidc-secret.
    clientSecretName: aml-oidc-secret
    # OAuth2 scopes requested during login. Keep this minimal to avoid
    # oversized ID/access tokens and oversized login cookies.
    # Default: openid profile email.
    scope: openid profile email
    # Whether to use the preferred_username claim as the email value.
    # Default: true.
    preferredUsernameAsEmail: true
    main:
      # OIDC authorization endpoint. If you use discovery, this maps from
      # authorization_endpoint.
      loginURL: https://<oidc-provider-authorization-endpoint>
      # OAuth2 callback URL registered in the external provider.
      redirectURL: https://<platform-address>/clusters/<cluster-name>/aml/oauth2/callback

如果 provider 在 <issuerURL>/.well-known/openid-configuration 提供标准 OIDC discovery 文档,且未设置以下字段,Alauda AI Platform 会从 discovery 文档自动填充 redeemURL、jwksURL 和 profileURL。如果 discovery 不可用,请显式配置这些字段:

Discovery 字段spec.oidc 字段
authorization_endpointloginURL
token_endpointredeemURL
userinfo_endpointprofileURL
jwks_urijwksURL

将映射后的 loginURL 值用于 main.loginURL;如果配置了辅助端点,则用于 secondary.loginURL。

spec:
  oidc:
    redeemURL: https://<oidc-provider-token-endpoint>
    jwksURL: https://<oidc-provider-jwks-endpoint>
    profileURL: https://<oidc-provider-userinfo-endpoint>

Keycloak 配置示例:

  • 在目标 realm 中创建 OpenID Connect 客户端。
  • 将 Client ID 设置为 spec.oidc.clientID 中使用的值,例如 aml。
  • 开启 Client authentication。
  • 在 Authentication flow 下选择 Standard flow。
  • 开启 Require PKCE,并将 PKCE Method 设置为 S256。
  • 将 Valid redirect URIs 设置为 https://<platform-address>/clusters/<cluster-name>/aml/*。
  • 从 Keycloak 客户端的 Credentials 选项卡复制客户端 Secret,并更新上文所示的 aml-oidc-secret Secret。
  • 在客户端的 Client scopes 设置中,将 basic、email 和 profile 设置为 Default,并将其他 scope 设置为 Optional,除非您的环境明确需要它们。除非确有需要,否则请勿添加 groups、realm roles、client roles、address、phone、offline access 等大型 claim mapper,以及其他特定于应用程序的 claim。大型令牌可能会导致 oauth2-proxy cookie 超出浏览器或 ingress 标头大小限制,从而造成登录循环或 HTTP 431/400 错误。

配置控制台语言(可选)

Alauda AI Platform 从 AmlCluster 实例中的 spec.i18n.languages 读取可用的控制台语言。默认值为 en。

支持的语言代码:

代码语言
zh简体中文
en英语
fr法语
ru俄语
ja日语
ko韩语
de德语
es西班牙语
it意大利语
pt-BR巴西葡萄牙语
zh-TW繁体中文

en 和 zh 是内置语言。其他语言只会作为可选项添加。若要成功切换到这些语言,还必须提供相应的翻译文件。

你可以参考内置的英文和中文翻译文件,为其他语言准备翻译文件:

/clusters/<cluster-name>/aml/console-aml/assets/i18n/en/lich-single.json
/clusters/<cluster-name>/aml/console-aml/assets/i18n/zh/lich-single.json

根据这些文件生成目标语言的翻译,或联系 Alauda 获取所需语言的最新翻译内容。

例如,要让英语、中文和法语可在控制台中选择,请更新 AmlCluster YAML:

spec:
  i18n:
    languages:
      - en
      - zh
      - fr

然后在 cpaas-system 命名空间中为法语创建翻译文件 ConfigMap:

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    image-load-config: "true"
  name: aml-i18n-fr
  namespace: cpaas-system
data:
  overrides: |
    [{
      "dest": "/aml-i18n/fr/lich-single.json",
      "configMap": {
         "name": "aml-i18n-fr",
         "key": "lich-single.json"
      }
    }]
  lich-single.json: |
    {
      "nav_model_repo": "Referentiel de modeles",
      "nav_infer_svc": "Service d'inference",
      "workbench": "Workbench",
      "tool": "Outils"
    }

对于其他非内置语言,使用相同的模式,将 fr 替换为目标语言代码,并提供翻译后的 lich-single.json 内容。

配置 Model Catalog

  • Model OCI Registry Address:托管 Model Catalog 的模型 OCI 工件的 Registry 地址。此字段没有默认值,必须根据您的环境进行配置。

    此 Registry 存储 Model Catalog 使用的模型 OCI 镜像。请使用 Harbor 或其他已启用 HTTPS 访问的生产模式 OCI Registry。Model Catalog 不支持配置 imagePullSecret 来拉取模型 OCI 镜像,因此 Model Catalog 使用的 Harbor 项目或仓库必须允许推理集群节点匿名拉取。在 Harbor 中,将存储 Model Catalog 镜像的项目设置为公共。

    如果无法在目标环境中部署支持 HTTPS 的 Registry,可以使用 HTTP Registry 作为备用方案。在部署模型之前,请在推理集群的每个节点上配置容器运行时。对于 containerd,可以为该 Registry 地址添加不安全的 Registry 镜像,例如创建 /etc/containerd/certs.d/<registry-host:port>/hosts.toml:

    server = "http://<registry-host:port>"
    
    [host."http://<registry-host:port>"]
      capabilities = ["pull", "resolve"]

    然后重启 containerd,或通过集群管理系统应用等效的节点运行时配置。此配置必须存在于调度推理服务 Pod 的节点上;否则,即使 Model Catalog 可以列出模型,Pod 镜像拉取也会失败。具体的 containerd 配置路径可能因 Kubernetes 发行版而异;应用配置后,请验证节点可以拉取 Model Catalog 镜像,例如使用 crictl pull <registry-host:port>/<repository>:<tag>。

  • Source of PVC:选择重用现有 PVC 还是创建新的 PVC。使用 CreateNew 让安装过程创建 PVC。

  • StorageClass Name:创建新 PVC 时使用的 StorageClass。

验证

查看配置并保存 default AmlCluster 实例,然后检查其状态:

kubectl get amlcluster default

资源应为 Ready:

NAME      PHASE   READY   REASON
default   Ready   True    Reconciled

导入用于 Catalog 的内置模型镜像

Alauda AI Platform 中的 Catalog 功能附带一组内置模型 OCI 镜像,用户可以通过 Web Console 将这些镜像部署为推理服务。这些镜像必须导入 Model Catalog 配置的 OCI registry,Catalog 才能提供这些镜像。如果未执行此步骤,安装过程仍会成功完成,但之后从 Catalog 部署内置模型时会失败,并显示 ImagePullBackOff。

获取 OCI 镜像 tarball

内置模型镜像以 OCI archive tarball(符合 OCI Image Layout Specification 的 .tar 文件)形式提供。每个 tarball 包含一个模型的多架构镜像(linux/amd64 + linux/arm64)。

从 Customer Portal Marketplace 下载 tarball,或联系 Alauda 支持代表以获取与您的 Alauda AI Platform 版本匹配的软件包。

推送到 Harbor

推荐的目标 registry 是 Harbor。以下示例使用 HTTP Harbor registry。如果您的 Harbor registry 使用 HTTPS,请省略 --plain-http,并将 API URL 从 http:// 更改为 https://。

在已安装 ctr、curl 和 jq,并且能够访问 Harbor 的节点上运行这些命令。

首先,设置环境变量:

export REG=<harbor-address>:<port>
export REPO=mlops/modelcar-qwen3.5-0.8b       
export TAG=v0.1.0                             
export TAR=./Qwen3.5-0.8B.oci.tar             
export AUTH='user:password'
  1. Harbor registry 端点,不包含 URL scheme。
  2. Harbor 中的目标 repository 路径,格式为 <project>/<image-name>。例如,mlops/modelcar-qwen3.5-0.8b 使用 Harbor 项目 mlops 和 repository modelcar-qwen3.5-0.8b。
  3. OCI archive 中包含的镜像标签。如果您不知道该标签,请使用下面的命令从 tarball 中提取。
  4. 上一步获取的 OCI archive tarball 的路径。
  5. 格式为 user:password 的 Harbor 凭据。如果您没有这些凭据,请联系平台管理员。

tarball 通常会在 OCI image layout 中包含其自身的标签(例如 v0.1.0)。如有需要,请从 tarball 中提取该标签:

export TAG=$(tar -xOf "$TAR" index.json \
  | jq -r '.manifests[0].annotations["org.opencontainers.image.ref.name"]')
echo "$TAG"   # should print something like v0.1.0

检查 Harbor 中是否已存在该镜像标签:

URL="http://$REG/api/v2.0/projects/${REPO%%/*}/repositories/$(printf '%s' "${REPO#*/}" | sed 's|/|%2F|g')/artifacts/$TAG"

HTTP=$(curl -s -u "$AUTH" -o /tmp/harbor-artifact.json -w '%{http_code}' "$URL")

echo "HTTP=$HTTP  URL=$URL"

[ "$HTTP" = 200 ] && jq '{digest, size, push_time, arch: .extra_attrs.architecture, tags: [.tags[].name], platforms: [.references[]?.platform]}' /tmp/harbor-artifact.json \
  || jq -r '.errors[]?.message' /tmp/harbor-artifact.json

如果 Harbor 项目尚不存在,请在推送前创建该项目:

PROJECT="${REPO%%/*}"

curl -s -u "$AUTH" -X POST "http://$REG/api/v2.0/projects" \
  -H 'Content-Type: application/json' \
  -d "{\"project_name\":\"$PROJECT\",\"public\":true}" \
  -w '\nHTTP %{http_code}\n'

如果项目已存在,Harbor 将返回非 2xx 状态码。确认项目存在后,确保已将其配置为 public 项目,然后继续执行导入和推送。Model Catalog 不支持在部署模型 OCI 镜像时配置 imagePullSecret,因此推理集群节点必须能够匿名拉取这些镜像。

然后运行导入和推送操作步骤:

# 1. Import into the node's containerd content store.
#    --base-name prepends $REG/$REPO to the tag carried inside the tarball,
#    producing a fully-qualified reference $REG/$REPO:$TAG.
ctr -n k8s.io images import \
  --all-platforms \
  --base-name "$REG/$REPO" \
  "$TAR"

# 2. Verify the import. You should see "$REG/$REPO:$TAG".
ctr -n k8s.io images ls -q | grep "$REPO"

# 3. Push to Harbor. Use --plain-http only for HTTP Harbor.
ctr -n k8s.io images push \
  --plain-http \
  --user "$AUTH" \
  "$REG/$REPO:$TAG"

# 4. Clean up the local reference on the node. Blob data is reclaimed by
#    containerd's garbage collector, leaving no persistent state on the node.
ctr -n k8s.io images rm "$REG/$REPO:$TAG"

对每个内置模型 tarball 重复此操作步骤,并根据模型分别修改 $REPO、$TAG 和 $TAR。

INFO

--all-platforms 在导入步骤中至关重要:省略该参数只会导入节点的主机架构,后续推送将静默遗漏其他平台的 blobs。在 push 上不需要此参数——推送 multi-arch index 时,会自动推送其引用的所有平台。

验证 Harbor 导入

确认 Harbor 现在可以提供该镜像:

URL="http://$REG/api/v2.0/projects/${REPO%%/*}/repositories/$(printf '%s' "${REPO#*/}" | sed 's|/|%2F|g')/artifacts/$TAG"

HTTP=$(curl -s -u "$AUTH" -o /tmp/harbor-artifact.json -w '%{http_code}' "$URL")

echo "HTTP=$HTTP  URL=$URL"

[ "$HTTP" = 200 ] && jq '{digest, size, push_time, arch: .extra_attrs.architecture, tags: [.tags[].name], platforms: [.references[]?.platform]}' /tmp/harbor-artifact.json \
  || jq -r '.errors[]?.message' /tmp/harbor-artifact.json

HTTP=200 表示镜像已成功导入 Harbor。预期输出包括 digest、大小、推送时间、标签和平台信息:

{
  "digest": "sha256:...",
  "size": 123456789,
  "push_time": "2026-05-06T00:00:00.000Z",
  "arch": "amd64",
  "tags": ["v0.1.0"],
  "platforms": [
    {"architecture": "amd64", "os": "linux"},
    {"architecture": "arm64", "os": "linux"}
  ]
}

现在,Alauda AI Platform 的核心功能已成功部署。如果您希望快速体验该产品,请参阅 Quick Start。

FAQ

1. 配置 aml-skipper 的审计输出目录

默认的审计输出路径是主机上的 /cpaas/audit。但是,在某些操作系统(例如 Alauda OS)中,主机的根路径为只读,无法创建 /cpaas 目录。在这种情况下,用户需要修改审计输出路径。

要修改审计输出路径,请更新 AmlCluster 默认资源,并在 spec.values 下添加 amlSkipper.auditLogHostPath.path 配置。例如:

apiVersion: amlclusters.aml.dev/v1alpha1
kind: AmlCluster
metadata:
  name: default
  ...
spec:
  ...
  values:
    amlSkipper:
      auditLogHostPath:
        path: /var/lib/audit
NOTE

具体路径应与 Alauda Container Platform Log Collector 的收集配置保持一致。

2. 为 root 模式的 vLLM-ascend 设置 KServe Modelcar UID

如果经过验证的多 NPU vLLM-ascend 部署无法使用默认的非 root UID 1000 初始化,请在 default AmlCluster 中将 KServe Modelcar UID 设置为 0:

spec:
  components:
    kserve:
      values:
        kserve:
          storage:
            uidModelcar: 0

此设置为集群级别设置,会影响 Alauda AI Platform 安装集群中的所有 Modelcar 工作负载。

有关完整的 root 模式操作步骤和回滚步骤,请参阅以 Root 身份运行多 NPU vLLM Ascend 推理。