File tree Expand file tree Collapse file tree 1 file changed +24
-16
lines changed
tests/e2e/scenarios/ai-conformance Expand file tree Collapse file tree 1 file changed +24
-16
lines changed Original file line number Diff line number Diff line change @@ -167,31 +167,39 @@ kind: ResourceClaim
167167metadata:
168168 name: test-gpu-claim
169169spec:
170- resourceClassName: nvidia-gpu
170+ devices:
171+ requests:
172+ - name: single-gpu
173+ exactly:
174+ deviceClassName: gpu.nvidia.com
175+ allocationMode: ExactCount
176+ count: 1
171177---
172- apiVersion: v1
173- kind: Pod
178+ apiVersion: batch/ v1
179+ kind: Job
174180metadata:
175181 name: test-gpu-pod
176182spec:
177- restartPolicy: Never
178- containers:
179- - name: test
180- image: nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda12.5.0-ubuntu22.04
181- command: ["/bin/sh", "-c"]
182- args: ["/cuda-samples/vectorAdd"]
183- resources:
184- claims:
183+ template:
184+ spec:
185+ restartPolicy: Never
186+ containers:
187+ - name: test
188+ image: nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda12.5.0-ubuntu22.04
189+ command: ["/bin/sh", "-c"]
190+ args: ["/cuda-samples/vectorAdd"]
191+ resources:
192+ claims:
193+ - name: gpu
194+ resourceClaims:
185195 - name: gpu
186- resourceClaims:
187- - name: gpu
188- resourceClaimName: test-gpu-claim
196+ resourceClaimName: test-gpu-claim
189197EOF
190198
191199echo " Waiting for Sample Workload to Complete..."
192200# Wait for the pod to succeed
193- kubectl wait --for=condition=Ready pod /test-gpu-pod --timeout=5m || true
194- kubectl logs test-gpu-pod || echo " Failed to get logs"
201+ kubectl wait --for=condition=complete job /test-gpu-pod --timeout=5m || true
202+ kubectl logs job/ test-gpu-pod || echo " Failed to get logs"
195203
196204# Note: The actual AI conformance test suite (e.g., k8s-ai-conformance binary)
197205# would be executed here. For this scenario, we establish the compliant environment.
You can’t perform that action at this time.
0 commit comments