From 30f648b0cb5f18d4ed1e4e923862e38516e08ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfred=20G=C3=B6ppel?= <43101280+alfi0812@users.noreply.github.com> Date: Sat, 8 Mar 2025 15:09:50 +0100 Subject: [PATCH] fix(docs): add intel gpu guide & small nvidia fixes (#33001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code - [x] 📜 Documentation Changes **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [x] 📄 I have made changes to the documentation - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Alfred Göppel <43101280+alfi0812@users.noreply.github.com> Signed-off-by: Kjeld Schouten Co-authored-by: Kjeld Schouten --- website/src/content/docs/guides/gpu/intel.md | 165 ++++++++++++++++++ website/src/content/docs/guides/gpu/nvidia.md | 4 +- 2 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 website/src/content/docs/guides/gpu/intel.md diff --git a/website/src/content/docs/guides/gpu/intel.md b/website/src/content/docs/guides/gpu/intel.md new file mode 100644 index 00000000000..51131e1344b --- /dev/null +++ b/website/src/content/docs/guides/gpu/intel.md @@ -0,0 +1,165 @@ +--- +title: Intel-GPU +--- + +:::caution[Charts] + +Adding a GPU to your Cluster isn't covered by the Support Policy. +Feel free to open a thread in the appropiate Channel in our Discord server. + +::: + +## Prerequisites + +- Having your GPU isolated when using a VM +- Passed the GPU to your Talos Machine when using a VM + +## Extensions for Talhelper/Clustertool + +:::caution[Charts] + +This Section assumes you are using Clustertool or Talhelper for your talos cluster. The steps may differ otherwise. + +::: + + +Its important to add the following Extensions to your `talconfig.yaml` for bootstrap: + +```yaml + +schematic: + customization: + systemExtensions: + officialExtensions: + - siderolabs/i915 + - siderolabs/intel-ucode + - siderolabs/mei + +``` + +## Adding it to your cluster + +If its a fresh bootstrap you can simply follow the clustertool guide on how to bootstrap your cluster. +If it is a existing cluster you will need to run `clustertool talos upgrade` to add the extensions to your cluster. + +## Adding Intel Repo for required Charts + +Add the following repo to your cluster if using fluxcd: + +```yaml + +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1.json +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: intel + namespace: flux-system +spec: + interval: 2h + url: https://intel.github.io/helm-charts + +``` + +## Add intel-device-plugin-operator + +Add the intel-device-plugin-operator to your cluster +Example helm-release configuration: + +```yaml + +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: intel-device-plugin-operator + namespace: system +spec: + interval: 30m + chart: + spec: + chart: intel-device-plugins-operator + version: 0.32.0 + sourceRef: + kind: HelmRepository + name: intel + namespace: flux-system + install: + crds: CreateReplace + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + crds: CreateReplace + remediation: + strategy: rollback + retries: 3 + dependsOn: + - name: node-feature-discovery + namespace: kube-system + values: + controllerExtraArgs: | + - --devices=gpu + +``` + +## Add intel-device-plugin-gpu + +Add the intel-device-plugin-gpu to your cluster +Example helm-release configuration: + +```yaml + +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: intel-device-plugin-gpu + namespace: system +spec: + interval: 30m + chart: + spec: + chart: intel-device-plugins-gpu + version: 0.32.0 + sourceRef: + kind: HelmRepository + name: intel + namespace: flux-system + install: + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + strategy: rollback + retries: 3 + dependsOn: + - name: intel-device-plugin-operator + namespace: system + values: + name: intel-gpu-plugin + sharedDevNum: 5 + nodeFeatureRule: true + +``` + +## Check if GPU is schedulable + +```bash + +kubectl get nodes -o=jsonpath="{range .items[*]}{.metadata.name}{'\n'}{' i915: '}{.status.allocatable.gpu\.intel\.com/i915}{'\n'}" + +``` + +## Example of GPU Assignment + +The following shows an example on how to add the GPU to a chart. Depending on the chart you may need to adapt the workload-name. + +```yaml +resources: + limits: + gpu.intel.com/i915: 1 +``` diff --git a/website/src/content/docs/guides/gpu/nvidia.md b/website/src/content/docs/guides/gpu/nvidia.md index 82c617408d8..63107690032 100644 --- a/website/src/content/docs/guides/gpu/nvidia.md +++ b/website/src/content/docs/guides/gpu/nvidia.md @@ -231,10 +231,10 @@ The following shows an example on how to add the GPU to a chart. Depending on th ```yaml resources: limits: - nvidia.com/gpu: 1 + nvidia.com/gpu: 1 workload: main: - podSpec: + podSpec: runtimeClassName: "nvidia" ```