Skip to content

Commit a6e7a80

Browse files
committed
tests/ai-conformance: update test job
1 parent c9de76e commit a6e7a80

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

tests/e2e/scenarios/ai-conformance/run-test.sh

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,31 +167,39 @@ kind: ResourceClaim
167167
metadata:
168168
name: test-gpu-claim
169169
spec:
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
174180
metadata:
175181
name: test-gpu-pod
176182
spec:
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
189197
EOF
190198

191199
echo "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.

0 commit comments

Comments
 (0)