Skip to content

ci: fail the build if the image exceeds a size ceiling - #138

Merged
saqibmanan merged 1 commit into
devfrom
ci/image-size-ceiling
Sep 3, 2026
Merged

ci: fail the build if the image exceeds a size ceiling#138
saqibmanan merged 1 commit into
devfrom
ci/image-size-ceiling

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

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 pull then ran past the deploy step's 40 minute command_timeout. Deploys failed with Run Command Timeout and 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_GB deliberately if the image legitimately needs to grow.

Context

Size
Before #137 14.1GB
After #137 3.56GB
Ceiling 8GB

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.
@saqibmanan
saqibmanan merged commit 0f41b4e into dev Sep 3, 2026
6 checks passed
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.

1 participant