make multistage built, add adjustable mb#364
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
2027 — Eval complete for commit
|
| URL | Mapping |
|---|---|
| digger.dev | → opensandbox-fix-upsize-default-builder.mintlify.app |
| opencomputer.dev | → opensandbox-fix-upsize-default-builder.mintlify.app |
2027 // complete the getting started guide at https://opencomputer.d — Did not finish
- ⚠️ Score nulled: AI judge determined the task was not completed — "Task incomplete — sandbox.create() failed with 402 'free trial credits exhausted', so the guide's Hello World command never ran."Prompt
complete the getting started guide at https://opencomputer.dev
Commit 860728e · View report →
Evaluating agent experience using 2027.dev · View dashboard
motatoes
approved these changes
Jun 11, 2026
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.
Settable build memory for declarative images (build big, run small)
Problem
Declarative image builds (
Image.base().aptInstall(...), snapshots) ran in a1 GB build sandbox, so heavy
apt/pip/npmbuilds OOM.The naive fix — give the builder more RAM — has a trap. The build checkpoint is
a savevm (it captures live memory), and
ForkFromCheckpointfloors everyfork at the snapshot's running memory (shrinking below it would OOM the
restored processes). So building at, say, 8 GB would pin every image's
minimum run size to 8 GB — a silent, permanent cost floor for all template users.
Solution
Decouple build memory from the image's run memory with a two-phase build:
builderMemory(default 4 GB, settable) — the only new image knob. Setsthe RAM for the build phase; raise it when a build OOMs.
the built disks at a 1 GB floor and snapshots that. So the build can use
4 GB (or more) while the image still forks down to 1 GB.
Sandbox.create({ memoryMB })hotplugs up from the 1 GB floor (pre-existing virtio-mem behavior). Every image
now covers the full 1 → 16 GB range.
The cold-boot reuses the existing
TemplateRootfsKeycreate path — no newQEMU/checkpoint code in the fragile subsystem, just orchestration.
API
One public knob on the image; the floor is internal.