33
44# GPU workload images
55
6- This directory defines workload test images for OpenShell GPU validation.
6+ This directory defines workload test images currently used by the OpenShell GPU
7+ e2e suite.
78
89## Contract
910
@@ -22,11 +23,10 @@ Each workload image must:
2223 command explicitly.
2324
2425OpenShell sandbox creation replaces the image entrypoint with the supervisor and
25- does not run the OCI image ` CMD ` . When these images are used through OpenShell,
26- the workload command from each manifest entry must be passed explicitly.
26+ does not run the OCI image ` CMD ` . E2e tests that use these images through
27+ OpenShell run the command from each manifest entry explicitly.
2728
28- The image build task writes a local workload manifest. Each workload entry
29- carries:
29+ The test harness is manifest-driven. Each workload entry carries:
3030
3131- ` name `
3232- ` image `
@@ -61,18 +61,17 @@ The build task uses `tasks/scripts/container-engine.sh`. Set
6161` CONTAINER_ENGINE=docker ` or ` CONTAINER_ENGINE=podman ` to choose an engine
6262explicitly. When unset, the helper uses its existing auto-detection behavior.
6363
64- Local tags use the current commit short SHA plus a short fingerprint of the
65- external build inputs. Dirty local trees append ` -dirty ` . Set
66- ` OPENSHELL_GPU_WORKLOAD_IMAGE_TAG=<tag> ` to override the tag.
64+ Local tags use a short SHA-256 fingerprint of the selected workload contexts
65+ and external build inputs. Set ` OPENSHELL_GPU_WORKLOAD_IMAGE_TAG=<tag> ` to
66+ override the tag.
6767
6868The task writes the latest build refs to:
6969
7070``` text
7171e2e/gpu/images/.build/latest.env
7272```
7373
74- The task also writes a local workload manifest for downstream tooling and
75- future workload-runner integration:
74+ The task also writes the local workload manifest used by the Rust e2e runner:
7675
7776``` text
7877e2e/gpu/images/.build/workloads.yaml
@@ -90,8 +89,7 @@ source e2e/gpu/images/.build/latest.env
9089```
9190
9291That env file exports ` OPENSHELL_E2E_WORKLOAD_MANIFEST ` pointing at the local
93- manifest. The current checked-in Rust GPU e2e target does not consume this
94- manifest yet. The per-image refs remain available as a convenience for direct
92+ manifest. The per-image refs remain available as a convenience for direct
9593container-engine validation.
9694
9795## Direct Validation
@@ -124,14 +122,63 @@ where Podman CDI is configured.
124122Direct container-engine validation catches image, CDI, CUDA, and host GPU setup
125123issues before OpenShell sandbox behavior is involved.
126124
127- ## OpenShell GPU E2E
125+ ## Manifest-Driven Validation
128126
129- The current Rust GPU validation target is:
127+ Run manifest-driven GPU validation through the e2e tasks so the workload
128+ images, manifest, gateway, and container-engine environment match CI:
130129
131130``` shell
132- mise run e2e:gpu
131+ mise run e2e:workloads:build
132+ mise run e2e:docker:gpu
133+ ```
134+
135+ For Podman GPU validation, build the manifest with
136+ ` CONTAINER_ENGINE=podman mise run e2e:workloads:build ` , then run
137+ ` mise run e2e:podman:gpu ` .
138+
139+ The workload validation path reads:
140+
141+ ``` text
142+ OPENSHELL_E2E_WORKLOAD_MANIFEST
143+ ```
144+
145+ When that variable is unset, the runner uses the default local manifest path:
146+
147+ ``` text
148+ e2e/gpu/images/.build/workloads.yaml
149+ ```
150+
151+ If neither path exists, the workload validation test prints a clear skip
152+ message telling you to run:
153+
154+ ``` shell
155+ mise run e2e:workloads:build
156+ ```
157+
158+ or to set ` OPENSHELL_E2E_WORKLOAD_MANIFEST ` to an external manifest.
159+
160+ Each manifest entry supplies the sandbox image and command. OpenShell runs that
161+ command through ` openshell sandbox create --gpu --from <image> -- <command> ` .
162+ The test runner iterates all GPU-tagged workload entries and enforces each
163+ entry's declared expectation:
164+
165+ - ` expect: pass ` requires ` OPENSHELL_GPU_WORKLOAD_SUCCESS `
166+ - ` expect: fail ` requires ` OPENSHELL_GPU_WORKLOAD_FAILURE `
167+
168+ The current local manifest includes three workloads:
169+
170+ - ` smoke-pass ` expected to pass
171+ - ` smoke-fail ` expected to fail
172+ - ` cuda-basic ` expected to pass
173+
174+ ## External Manifests
175+
176+ External workload catalogs can use the same schema. Point the runner at one
177+ with:
178+
179+ ``` shell
180+ export OPENSHELL_E2E_WORKLOAD_MANIFEST=/abs/path/to/workloads.yaml
133181```
134182
135- That target runs ` gpu_device_selection ` . It validates GPU request and device
136- selection behavior against a Docker-backed gateway. It does not run the
137- workload manifest generated by ` mise run e2e:workloads:build ` .
183+ That lets alternate workload manifests use the same test runner without
184+ introducing per-workload env vars.
0 commit comments