feat: add Slurm image lifecycle jobs - #896
Open
nabinchha wants to merge 1 commit into
Open
Conversation
Stage digest-bound OCI import and existing-SQSH inspection plans beneath the selected workspace. Reuse safe batch rendering and isolated Slurm submission while shipping a standalone factual inspector for target images. Part of #867 Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
Contributor
Greptile SummaryAdds a checksum-bound Slurm lifecycle for importing digest-qualified OCI images and inspecting existing SQSH artifacts.
|
| Filename | Overview |
|---|---|
| packages/data-designer-slurm/src/data_designer/slurm/images/lifecycle.py | Implements lifecycle preparation, checksum verification, deterministic batch rendering, Enroot execution, and isolated Slurm submission; no actionable defect was established. |
| packages/data-designer-slurm/src/data_designer/slurm/images/records.py | Adds immutable lifecycle plan records and validates workspace-derived paths, operation/source consistency, and package-owned runtime artifacts. |
| packages/data-designer-slurm/src/data_designer/slurm/images/resources/inspect_image.py | Adds a standard-library-only image inspector whose client and serving requirements align with the existing inspection contract. |
| packages/data-designer-slurm/src/data_designer/slurm/launcher/batch.py | Extracts validated batch-directive rendering and shell quoting into shared launcher primitives. |
| packages/data-designer-slurm/src/data_designer/slurm/launcher/renderer.py | Adopts the shared rendering primitives while preserving the existing generation-script structure. |
| packages/data-designer-slurm/tests/images/test_lifecycle.py | Covers lifecycle modes, URI normalization, contract mutations, staging permissions, tamper rejection, and inspection-record compatibility. |
Sequence Diagram
sequenceDiagram
participant Caller
participant Lifecycle
participant Workspace
participant Slurm
participant Enroot
participant Inspector
Caller->>Lifecycle: prepare(request, profile, lifecycle_id)
Lifecycle->>Workspace: Stage inspector, Enroot rc, plan, and batch script
Caller->>Lifecycle: submit(prepared job)
Lifecycle->>Workspace: Verify plan and script digests
Lifecycle->>Slurm: "sbatch --export=NIL"
Slurm->>Enroot: Import OCI when required
Slurm->>Enroot: Create and start container
Enroot->>Inspector: Inspect client or serving image
Inspector->>Workspace: Atomically write inspection.json
Reviews (1): Last reviewed commit: "feat: add Slurm image lifecycle jobs" | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
Add the structured CPU Slurm lifecycle needed to import digest-qualified OCI images and inspect existing SQSH artifacts. The lifecycle stages checksum-bound package resources beneath the selected workspace and submits a thin, isolated batch job through the shared Slurm launcher.
🔗 Related Issue
Part of #867
🔄 Changes
sbatchsubmission.🔍 Attention Areas
images/lifecycle.py— CPU Slurm and Enroot command semantics, checksum boundaries, and attempt-local staging.images/records.py— persisted lifecycle invariants and separation of source OCI identity from produced SQSH identity.🧪 Testing
make check-slurmpassesmake test-slurmpasses — 600 testsmake test-slurm-wheel-installpasses✅ Checklist