ci: fail the build if the image exceeds a size ceiling - #138
Merged
Conversation
Image size is a deploy-time failure mode here and nothing surfaced it. The image reached 14.1GB - 6.6GB of it CUDA runtime on a GPU-less box - and docker pull then ran past the deploy step's 40 minute command_timeout, so deploys failed with "Run Command Timeout" and no indication of the cause. Builds stayed green throughout; the cost only appeared on the host, an hour later, on an environment that could no longer be deployed to. Fails the build instead, so the feedback lands on the PR that caused it. The ceiling is 8GB against a current 3.56GB - set from the measured size after the CPU-only torch fix, with room for ordinary growth but not for another multi-gigabyte dependency arriving unnoticed. The error message names the usual culprits so whoever hits it knows where to look.
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.
Guards the regression that just broke deploys.
Why
Image size is a deploy-time failure mode here, and nothing surfaced it. The image reached 14.1GB — 6.6GB of it CUDA runtime on a GPU-less box — and
docker pullthen ran past the deploy step's 40 minutecommand_timeout. Deploys failed withRun Command Timeoutand no indication of the cause.Builds stayed green the entire time. The cost only appeared on the host, an hour later, on an environment that could no longer be deployed to. #136 merged green and then simply could not be shipped.
What it does
Fails the build instead, so feedback lands on the PR that caused it rather than an hour later on a broken environment.
Ceiling is 8GB against a current 3.56GB — set from the measured size after #137, with room for ordinary growth but not for another multi-gigabyte dependency arriving unnoticed. The error message names the usual culprits (
nvidia/*,torch,triton) so whoever trips it knows where to look.Raise
MAX_IMAGE_GBdeliberately if the image legitimately needs to grow.Context