如何在 Kuscia 中升级引擎镜像?

打开链接即可点亮社区Star,照亮技术的前进之路。

Github 地址:github.com/secretflow/...

Kuscia 支持在部署后升级引擎版本,本文档介绍如何在 Kuscia 中升级引擎镜像。

导入引擎镜像

Kuscia 提供脚本升级镜像和手动升级镜像两种方式,您可以根据自己的需求选择合适的方式。

脚本升级镜像

  1. 获取工具脚本

    shell 复制代码
    docker cp root-kuscia-autonomy-alice:/home/kuscia/scripts .
  2. 注册镜像

    点对点模式

    Autonomy 节点需要同时导入引擎镜像和注册 AppImage,下面以 root-kuscia-autonomy-alice 节点为例,其他 Autonomy 节点也需要进行导入

    shell 复制代码
    ./scripts/deploy/register_app_image.sh -c root-kuscia-autonomy-alice -i secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:latest -f scripts/templates/app_image.secretflow.yaml --import

    中心化模式

    Master 节点注册 AppImage 即可,下面以 root-kuscia-master 为例

    shell 复制代码
    ./scripts/deploy/register_app_image.sh -c root-kuscia-master -i secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:latest -f scripts/templates/app_image.secretflow.yaml

    Lite 节点导入引擎镜像即可,下面以 root-kuscia-lite-alice 节点为例,其他 Lite 节点也需要进行导入

    shell 复制代码
    ./scripts/deploy/register_app_image.sh -c root-kuscia-lite-alice -i secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:latest --import

手动升级镜像

kuscia 命令支持在 RunC、RunP 模式中导入引擎镜像,使用示例如下:

  1. 登录到 Autonomy、Lite 节点中

    shell 复制代码
    docker exec -it ${USER}-kuscia-autonomy-alice bash
  2. 导入镜像

    执行 kuscia image 导入镜像,此处以 sf 镜像为例

    shell 复制代码
    # Import Image
    kuscia image pull secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:1.11.0b1

    如果您使用的是私有仓库,请加上 creds 参数指定账户密码,示例如下:

    shell 复制代码
    # Import Image
    kuscia image pull --creds "user:password" private.registry.com/secretflow/secretflow-lite-anolis8:1.11.0b1

    如果您的环境无法访问镜像仓库,您也可以将镜像打成 tar 包传到容器里,然后通过 kuscia image load 导入,示例如下:

    shell 复制代码
    # Import Image
    kuscia image load -i secretflow-lite-anolis8.tar

    验证镜像导入成功

    shell 复制代码
    # View Image
    kuscia image list
  3. 注册 AppImage

    镜像导入之后需要在 Autonomy 和 Master 节点上修改 AppImage,Lite 节点无需执行,示例如下:

    shell 复制代码
    # Enter the master container
    docker exec -it ${USER}-kuscia-master bash
    
    # The appimage is based on the actual engine name, we use the default name of secretflow as an example.
    kubectl edit appimage secretflow-image
    
    # Modify the name and tag in the image field, then save and exit.
      image:
        name: xxx
        tag: xxx
相关推荐
世人万千丶1 天前
Flutter 框架跨平台鸿蒙开发 - 恐惧清单应用
学习·flutter·华为·开源·harmonyos·鸿蒙
AI_零食1 天前
Flutter 框架跨平台鸿蒙开发 - 孤独指数应用
学习·flutter·开源·harmonyos
芯智工坊1 天前
第13章 Mosquitto监控与日志管理
前端·网络·人工智能·mqtt·开源
扬帆破浪1 天前
开源的WPS AI文档编审软件适用场景:察元 AI 文档助手
人工智能·开源
扬帆破浪1 天前
麒麟系统安装察元 WPS AI 文档助手:免费、开源、离线部署说明
人工智能·开源·wps
搜佛说1 天前
01-第1章-概述与快速开始
物联网·golang·开源·软件工程·边缘计算·嵌入式实时数据库
2301_822703201 天前
开源鸿蒙跨平台Flutter开发:跨端图形渲染引擎的类型边界与命名空间陷阱:以多维雷达图绘制中的 dart:ui 及 StrokeJoin 异常为例
算法·flutter·ui·开源·图形渲染·harmonyos·鸿蒙
2301_822703201 天前
鸿蒙flutter框架Error: 00625004 SymLink Dir Failed解决方案
flutter·华为·开源·harmonyos·鸿蒙
扬帆破浪1 天前
免费开源的WPS AI 插件,离线安装、多系统与内网模型
人工智能·开源·wps
世人万千丶1 天前
Flutter 框架跨平台鸿蒙开发 - 嫉妒分析器应用
学习·flutter·华为·开源·harmonyos·鸿蒙