Repository navigation
[CI] Preload GPU Docker image in AMD64 runner AMIs - #109
Open
RAMitchell wants to merge 1 commit into
Open
RAMitchell wants to merge 1 commit into
RAMitchell wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fresh GPU CI runners spend about 140 seconds downloading and extracting
xgb-ci.gpu; the same pull took 0.05 seconds with the image cached (measurement). Preloadxgb-ci.gpu:mainduring the normal AMD64 Packer build so new runners inherit those Docker layers from the AMI.The preload step checks GPU access inside the image, records its digest and size in the build log, removes temporary registry credentials, and stops Docker/containerd before snapshotting. CI must continue pulling its requested tag: newer Docker images remain usable even before the next AMI rebuild. Concise inline comments explain why the step exists and when it can be removed.
The AMD64 image is shared by CPU and GPU runners, so both inherit the extra cached image (measured at 11.64 GB locally). The existing AMI name and 40 GB disk size are retained. ARM64 and Windows builds are unchanged.
Building
The AMD64 build now requires an EC2 instance profile with ECR pull permissions:
The profile needs
ecr:GetAuthorizationTokenplusecr:BatchGetImage,ecr:GetDownloadUrlForLayer, andecr:BatchCheckLayerAvailabilityforxgb-ci.gpu. The Packer operator needs permission to pass that role. This change does not create IAM resources or automate AMI rebuilds.Validation