当前位置: 首页 > news >正文

OpenShift AI - 用 Hardware profiles 为运行环境分配可用的硬件规格

《OpenShift / RHEL / DevSecOps 汇总目录》
说明:本文已经在 OpenShift 4.19 + OpenShift AI 2.29 的环境中验证

启用 Hardware profiles 功能

截止到 OpenShift AI 2.22,Hardware profiles 虽然还处于 Technology Preview 阶段,但因为原有的 Accelerator profiles 功能即将被淘汰,因此本文就介绍功能更强的 Hardware profiles。

  1. 执行命令编辑 OdhDashboardConfig 对象,添加 disableHardwareProfiles: false 一行即可。
$ oc edit OdhDashboardConfig odh-dashboard-config
...
spec:dashboardConfig:disableAcceleratorProfiles: falsedisableBYONImageStream: falsedisableClusterManager: falsedisableCustomServingRuntimes: falsedisableDistributedWorkloads: falsedisableHardwareProfiles: false ### add this line and save ###
...
  1. 完成后进入 OpenShift AI 控制台的 Settings -> Hardware profiles 菜单即可。注意:Hardware profiles 菜单出现后,原有 Accelerator profiles 菜单就消失了。
    在这里插入图片描述

创建 Hardware profile

  1. 在 Hardware profiles 页面中点击 Create new hardware profile 按钮。
  2. 在 Create hardware profile 页面中,将 Name 设为 Small with L4,即带有 NVIDIA L4 的小型运行环境。
    在这里插入图片描述
  3. 可以将 Visibility 设为只对 Workbenchs 可见。
    在这里插入图片描述
  4. 在 Resource requests and limits 部分通过 Add resource 按钮添加一个 Accelerator 类型的资源。
    在这里插入图片描述
  5. 在 Node selectors 部分点击 Add node selector 按钮,根据配有 GPU 的节点的 nvidia.com/gpu.product: NVIDIA-L4 标签添加一个 selector。
    在这里插入图片描述
  6. 最后点击 Create hardware profile 即可。

使用 Hardware profile

  1. 在 Workbench 的配置页面中选择 Small with L4 的 Hardware profile,并且可以调整 CPU、内存和 GPU 的使用数量。
    在这里插入图片描述
  2. 确认 Workbench 可以运行。
    在这里插入图片描述

将原有的 Accelerator profiles 迁移至 Hardware profiles

OpenShift AI 原先使用 OdhDashboardConfig 对象保存 Workbench notebook 和 ModelServing 可用的 CPU 和内存规格。

$ oc get OdhDashboardConfigs odh-dashboard-config
...
spec:modelServerSizes:- name: Smallresources:limits:cpu: '2'memory: 8Girequests:cpu: '1'memory: 4Gi- name: Mediumresources:limits:cpu: '8'memory: 10Girequests:cpu: '4'memory: 8Gi- name: Largeresources:limits:cpu: '10'memory: 20Girequests:cpu: '6'memory: 16GinotebookSizes:- name: Smallresources:limits:cpu: '2'memory: 8Girequests:cpu: '1'memory: 8Gi- name: Mediumresources:limits:cpu: '6'memory: 24Girequests:cpu: '3'memory: 24Gi- name: Largeresources:limits:cpu: '14'memory: 56Girequests:cpu: '7'memory: 56Gi- name: X Largeresources:limits:cpu: '30'memory: 120Girequests:cpu: '15'memory: 120Gi
...

而 GPU 和节点的对应关系是在 Accelerator profiles 中定义的。
在这里插入图片描述

当为 OpenShift AI 启用新的 Hardware profiles 功能后,在该功能的 Hide legacy profiles 区域可以找到通过 OdhDashboardConfig 和 Accelerator profiles 定义的配置。这些配置可通过 Migrate 菜单迁移到新的 Hardware profiles 中。
在这里插入图片描述

参考

https://ai-on-openshift.io/odh-rhoai/configuration/
https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/2.22/html/working_with_accelerators/working-with-hardware-profiles_accelerators
https://medium.com/@roeywer/optimized-users-workload-resources-with-openshift-ai-hardware-profiles-22efc018ef9d
https://github.com/rh-aiservices-bu/accelerator-profiles-guide/tree/main
https://blog.csdn.net/weixin_43220532/article/details/111051773

http://www.lryc.cn/news/607594.html

相关文章:

  • Windows和Linux的tree工具
  • 移动端 WebView 内存泄漏与性能退化问题如何排查 实战调试方法汇总
  • 【数据结构与算法】21.合并两个有序链表(LeetCode)
  • (28)运动目标检测之随机曲线上的离散点进行插值
  • 【MySQL索引失效场景】索引失效原因及最左前缀原则详解
  • 【C语言】字符函数与字符串函数详解
  • 数据结构(11)栈和队列算法题 OVA
  • dify 升级1.7.1 插件无法下载依赖
  • [VL|RIS] ReferSAM
  • 11.Layout-Pinia优化重复请求
  • 使用 whisper, 音频分割, 初步尝试,切割为小块,效果还不错 1
  • [ Leetcode ]---快乐数
  • [lvgl_player] 用户界面(LVGL) | 播放器核心设计
  • 8.1每日一题
  • Vue 3 入门教程 8 - 路由管理 Vue Router
  • 使用GPU和NPU视频生成的优劣对比
  • Windows系统优化命令-记录
  • 面向对象学习(一)
  • 【Linux我做主】细说环境变量
  • Vue2 项目实现 Gzip 压缩全攻略:从配置到部署避坑指南
  • IIS 让asp.net core 项目一直运行
  • TwinCAT3编程入门2
  • 第k小整数(快排)
  • 如何理解卷积,和自注意力机制的局限与优势(个人理解)
  • 倒计时!2025国自然放榜时间锁定
  • 使用Nginx部署前端项目
  • 【Linux】磁盘存储+文件系统简介
  • 开箱即用的Next.js SSR企业级开发模板
  • Java Ai 数组:day(09)
  • 【Nginx反向代理】通过Nginx反向代理将多个后端server统一到同一个端口上的方法