Skip to content

[ci] Preserve GPU access and isolate container scratch files - #6512

Merged
yuxuan-lou merged 6 commits into
mainfrom
fix/ci-container-gpu-access
Nov 5, 2026
Merged

yuxuan-lou merged 6 commits into
mainfrom
fix/ci-container-gpu-access

Conversation

@richardoo-707

@richardoo-707 richardoo-707 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #6509. Related to the Layer 2 infrastructure failures on #6506.

GPU containers could lose device permissions after a cgroup/resource update while /dev/nvidia* remained visible. Resolve allocated UUIDs to actual device minors from NVIDIA's XML inventory and explicitly register those GPU nodes and the CUDA control nodes with Docker. Every visible GPU must then complete an allocation, computation and synchronization probe before tests.

Move disposable source, HOME and compiler caches to a private /tmp tmpfs to avoid the observed overlay2 removal failure. Record the container exit code and cleanup error separately; cleanup failures still fail the job and preserve the original execution exception.

Numerical acceptance requires real Git provenance. Fetch the pinned commit/tree metadata, reconstruct file objects from the compressed archive, and verify the complete Git tree with lazy downloads disabled. The standalone .git survives the container's private source copy and supports offline commit and dirty-tree checks.

Validation on head 9382593b42c5ab0e70ccb8e1147a45b554ced74a, tested merge 05978230a94352c85ad45e67790851188c033687:

Check Result
Linux CI helper tests 78 passed, 0 skipped
Layer 1 Formatting passed; CPU 151 passed / 26 existing hardware/version skips
Fork-safe gate Lint/policy/helpers passed; CPU 155 passed / 26 existing hardware/version skips
Layer 2, batch 2 23 passed / 2 existing HF5 reference skips, 1 GPU
Same run, batch 4a 22 passed, 0 skipped, 1 GPU
Same run, batch 5 69 passed, 0 skipped, 2 GPUs

All three GPU containers exited 0 and were removed successfully. Runtime: H20-5, Python 3.10.12 / Torch 2.13.0+cu130, existing approved image sha256:ae8ff34bf340a692803edca6e0f38a576fc1a2b206c01b4ef6f7c2a40dfd8c10. Regular Layer 2 uses FAST_MODE=1 / FAST_TEST=1; this final run needed no test reruns. The earlier Draft smoke also passed 22 batch-4a tests with fast mode disabled.

A controlled two-H20 probe on runtime-fix commit d31489ff134e99c9dcd267e1508b426f7d686d1e also computed successfully before and after updating only its own container's CPU quota. Source checkout regressions cover offline copied metadata, gitlinks, a missing SHA and a mismatched archive. Repository pre-commit and runner-policy checks passed.

The dependency image, GPU pool, test selection, numerical tolerances and version.txt are unchanged. tmpfs shares the existing container memory limit, capped at COLOSSAL_CI_MEMORY. Existing Docker records already stuck in removal still require administrator maintenance. Four/eight-GPU Layer 3 is outside this validation.

@richardoo-707
richardoo-707 marked this pull request as ready for review November 5, 2026 00:55
@richardoo-707
richardoo-707 requested a review from a team as a code owner November 5, 2026 00:55
@yuxuan-lou
yuxuan-lou merged commit f4ef8b4 into main Nov 5, 2026
11 of 13 checks passed
@yuxuan-lou
yuxuan-lou deleted the fix/ci-container-gpu-access branch November 5, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] GPU device access is lost after container cgroup updates

2 participants