Repository navigation
docs: add blog post and lab guide for Volcano + HAMi-core soft slicing #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
1ea66ab
c151fd3
92d9e03
1af1dfe
4a43916
a1bdefe
455d1a0
ce167c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Volcano scheduler configuration with the deviceshare plugin in HAMi vNPU mode. | ||
| # Apply into volcano-system, then: kubectl -n volcano-system rollout restart deploy volcano-scheduler | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: volcano-scheduler-configmap | ||
| namespace: volcano-system | ||
| data: | ||
| volcano-scheduler.conf: | | ||
| actions: "enqueue, allocate, backfill" | ||
| tiers: | ||
| - plugins: | ||
| - name: priority | ||
| - name: gang | ||
| enablePreemptable: false | ||
| - name: conformance | ||
| - plugins: | ||
| - name: overcommit | ||
| - name: drf | ||
| enablePreemptable: false | ||
| - name: predicates | ||
| - name: deviceshare | ||
| arguments: | ||
| deviceshare.AscendHAMiVNPUEnable: "true" | ||
| deviceshare.SchedulePolicy: binpack | ||
| deviceshare.KnownGeometriesCMNamespace: kube-system | ||
| deviceshare.KnownGeometriesCMName: hami-scheduler-device | ||
| - name: proportion | ||
| - name: nodeorder | ||
| - name: binpack |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Per-node HAMi device plugin configuration: enable hami-vnpu-core on one node. | ||
| # Replace "aio-node74-arm" with your Ascend node name. vDeviceCount is the max | ||
| # vNPU count per physical card (the 310P3 driver caps it at 7 in practice). | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: hami-scheduler | ||
| app.kubernetes.io/name: hami | ||
| app.kubernetes.io/instance: hami | ||
| name: hami-device-node-config | ||
| namespace: kube-system | ||
| data: | ||
| node-config.yaml: |- | ||
| nodes: | ||
| - name: "aio-node74-arm" | ||
| hami-vnpu-core: true | ||
| vDeviceCount: 8 | ||
| filterDevices: | ||
| index: [] | ||
| uuid: [] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # First soft-sliced vNPU Pod: 1 vNPU with an 8192 MiB memory slice. | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: ascend-vnpu-check | ||
| annotations: | ||
| huawei.com/vnpu-mode: hami-core | ||
| spec: | ||
| schedulerName: volcano | ||
| runtimeClassName: ascend | ||
| containers: | ||
| - name: npu | ||
| image: quay.io/ascend/vllm-ascend:v0.18.0-310p | ||
| command: ["sleep", "infinity"] | ||
| resources: | ||
| limits: | ||
| huawei.com/Ascend310P: "1" | ||
| huawei.com/Ascend310P-memory: "8192" | ||
|
Comment on lines
+11
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Restrict both validation Pods. Both manifests allow privilege escalation and can run as root. These tutorial manifests are copy-pasteable cluster workloads.
🧰 Tools🪛 Checkov (3.3.9)[medium] 2-18: Containers should not run with allowPrivilegeEscalation (CKV_K8S_20) [medium] 2-18: Minimize the admission of root containers (CKV_K8S_23) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Second soft-sliced vNPU Pod, identical to the first: with the binpack policy | ||
| # it lands on the same physical card as ascend-vnpu-check. | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: ascend-vnpu-check-2 | ||
| annotations: | ||
| huawei.com/vnpu-mode: hami-core | ||
| spec: | ||
| schedulerName: volcano | ||
| runtimeClassName: ascend | ||
| containers: | ||
| - name: npu | ||
| image: quay.io/ascend/vllm-ascend:v0.18.0-310p | ||
| command: ["sleep", "infinity"] | ||
| resources: | ||
| limits: | ||
| huawei.com/Ascend310P: "1" | ||
| huawei.com/Ascend310P-memory: "8192" |
Uh oh!
There was an error while loading. Please reload this page.