6.2. 配置分布式工作负载
要为数据科学家配置分布式工作负载功能,以便在 OpenShift AI 中使用,您必须启用几个组件。
先决条件
-
已使用
cluster-admin
角色登录到 OpenShift Container Platform。 - 您有足够的资源。除了基础 OpenShift AI 资源外,还需要 1.1 vCPU 和 1.6 GB 内存来部署分布式工作负载基础架构。
- 您可以访问 Ray 集群镜像。有关如何创建 Ray 集群的详情,请参考 Ray Clusters 文档。
- 您已删除了之前安装的 CodeFlare Operator 实例,如知识库文章 如何在数据科学集群中从单独安装的 CodeFlare Operator 迁移。
- 如果要使用图形处理单元(GPU),已在 OpenShift AI 中启用 GPU 支持。请参阅 OpenShift AI 中的启用 GPU 支持。
如果要使用自签名证书,您必须将它们添加到中央证书颁发机构(CA)捆绑包中,如 使用证书(断开连接环境 )所述。https://access.redhat.com/documentation/zh-cn/red_hat_openshift_ai_self-managed/2.8/html/installing_and_uninstalling_openshift_ai_self-managed/working-with-certificates_certs https://access.redhat.com/documentation/zh-cn/red_hat_openshift_ai_self-managed/2.8/html/installing_and_uninstalling_openshift_ai_self-managed_in_a_disconnected_environment/working-with-certificates_certs不需要额外的配置来将这些证书与分布式工作负载一起使用。集中配置的自签名证书会在以下挂载点的工作负载 pod 中自动提供:
集群范围的 CA 捆绑包:
/etc/pki/tls/certs/odh-trusted-ca-bundle.crt /etc/ssl/certs/odh-trusted-ca-bundle.crt
/etc/pki/tls/certs/odh-trusted-ca-bundle.crt /etc/ssl/certs/odh-trusted-ca-bundle.crt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 自定义 CA 捆绑包:
/etc/pki/tls/certs/odh-ca-bundle.crt /etc/ssl/certs/odh-ca-bundle.crt
/etc/pki/tls/certs/odh-ca-bundle.crt /etc/ssl/certs/odh-ca-bundle.crt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
步骤
-
在 OpenShift Container Platform 控制台中,点 Operators
Installed Operators。 - 搜索 Red Hat OpenShift AI Operator,然后点 Operator 名称以打开 Operator 详情页面。
- 点 Data Science Cluster 选项卡。
单击默认实例名称,以打开实例详情页面。
注意从 Red Hat OpenShift AI 2.4 开始,新安装的默认实例名称为 default-dsc。之前安装的默认实例名称( rhods )会在升级过程中保留。
- 点 YAML 选项卡显示实例规格。
在
spec.components
部分中,确保根据分布式工作负载是否从管道或笔记本运行,确保为所需组件正确设置managementState
字段,如下表所示。Expand 表 6.1. 分布式工作负载所需的组件 组件 仅限管道 仅限笔记本 管道和笔记本 codeflare
受管
受管
受管
dashboard
受管
受管
受管
datasciencepipelines
受管
删除
受管
ray
受管
受管
受管
工作台
删除
受管
受管
-
点击 Save。片刻后,带有
Managed
状态的组件已就绪。
验证
检查 codeflare-operator-manager
pod 的状态,如下所示:
- 在 OpenShift Container Platform 控制台中,从 Project 列表中选择 redhat-ods-applications。
-
点 Workloads
Deployments。 - 搜索 codeflare-operator-manager 部署,然后点部署名称以打开部署详情页面。
-
点 Pods 选项卡。当
codeflare-operator-manager-_<pod-id>_
pod 的状态为Running
时,pod 已准备好使用。要查看有关 pod 的更多信息,请点 pod 名称以打开 pod 详情页面,然后点 Logs 选项卡。