其他应用功能

在应用程序中多次使用相同的微服务组件

自 UCS 2.5.0 起,应用程序清单可以多次指定相同的微服务。例如,下面我们有一个应用程序,它两次使用微服务 A,一次使用微服务 B

specVersion: '2.5.0'

version: 0.0.1

doc: README.md

name: multiple-same-ms-example

description: MS A is used twice

dependencies:
- ucf.svc.microserviceA:0.0.1
- ucf.svc.microserviceB:0.0.1

components:
- name: microserviceA one
  type: ucf.service.microserviceA
  parameters:
    paramA1: 100
    paramA2:
    - name: tango
    imagePullSecrets:
    - name: ngc-docker-reg-secret
- name: microserviceA two
  type: ucf.service.microserviceA
  parameters:
    paramA1: 200
    paramA2:
    - name: waltz
    imagePullSecrets:
    - name: ngc-docker-reg-secret
- name: microserviceB
  type: ucf.service.microserviceB
  parameters:
    paramB1: false
  secrets:
    some-secret-name: some-secret

connections:
  microserviceA one/http: microserviceB/http
  microserviceA two/http: microserviceB/http

此功能使用 Helm Chart 别名 实现,生成的 Chart.yaml 如下所示

apiVersion: v2
name: multiple-same-ms-example
description: MS A is used twice
type: application
version: 0.1.0
appVersion: ''
dependencies:
- name: ucf.svc.microserviceB
  version: 0.0.1
- name: ucf.svc.microserviceA
  version: 0.0.1
  alias: microserviceA one
- name: ucf.svc.microserviceA
  version: 0.0.1
  alias: microserviceA two

当前的限制是,在 MicrosrviceA 的第一个实例中指定的任何参数也将应用于第二个实例(或第三个和第四个等)。如果您不希望出现这种情况,则需要为同一微服务的任何实例指定相同的参数和所需的值,否则默认值将不适用。

与 NVIDIA K8s RAG Operator 交互

自 UCS Tools 2.5 起,一个新的内置组件 ucf.svc.rag-operator-external 可用,它代表 NVIDIA K8s Operator。这允许 UCS 应用程序中的微服务隐式连接到由 RAG Operator 管理和部署的 NeMo 微服务,从而简化了在 UCS Tools 中 RAG 应用程序的开发。

RAG Operator 需要在部署使用它的 UCS 应用程序之前部署到目标 K8s 平台。NVIDIA GPU Operator 是一个依赖项,必须在安装 RAG Operator 之前运行。有关部署 RAG Operator 的说明,请参阅该项目的主页。简而言之,您需要执行以下操作

helm repo add nemollm-ea-rag-examples https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-rag-examples
helm install rag-operator nemollm-ea-rag-examples/rag-operator -n rag-operator --create-namespace

您还可以选择配置 GPU 时间分片

请参阅我们 UCS-Tools GitLab 仓库中的示例 UCS RAG 应用程序