switchcraft: include model weights by default; add missing README.container.md - #2
Merged
Merged
Conversation
…tainer.md
The published switchcraft:67ffc0d image was built with DOWNLOAD_WEIGHTS=false
(the Dockerfile default), so it shipped with only the CCD ligand database and was
missing the required Boltz-1 checkpoint (boltz1_conf.ckpt). switchcraft.py
hardcodes Boltz1.load_from_checkpoint("boltz/boltz1_conf.ckpt") with no runtime
download, so the image failed immediately on any real design run (verified: a test
run only succeeded once the 3.5 GB checkpoint was bind-mounted into the image).
Flip DOWNLOAD_WEIGHTS to default to true so the image runs out of the box, matching
the convention used by the boltz containers (which bake weights in). A slim
weights-free build is still available via --build-arg DOWNLOAD_WEIGHTS=false
(weights can then be bind-mounted at runtime).
Also add the missing README.container.md that the Dockerfile COPYs into the image
at /README.md. Without it `docker build` fails at the COPY step; the file was
referenced in 44f61b4 ("Add SwitchCraft") but never committed (cf. engens and
cf-random which ship their own README.container.md alongside the Dockerfile).
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Problem
The published
switchcraft:67ffc0dimage cannot run any real design out of the box.The Dockerfile defaulted to
ARG DOWNLOAD_WEIGHTS=false, so the image ships with only the CCD ligand database (ccd.pkl) and is missing the required Boltz-1 checkpointboltz1_conf.ckpt.switchcraft.pyhardcodes:with no runtime download, so every design run fails at model load.
Reproduction
I confirmed the image lacks the checkpoint (
ls /app/boltz/→ onlyccd.pklsymlink). Apos_allosteryrun only succeeded once the 3.5 GB checkpoint was downloaded from Hugging Face and bind-mounted into/app/boltz/boltz1_conf.ckpt— it then completed a full design (~9 min, valid holo/apo structures with correct ligand placement and confidence metrics).Fix
This PR makes two changes to
dockerfiles/switchcraft/67ffc0d/:1.
Dockerfile— include weights by defaultARG DOWNLOAD_WEIGHTS=false→ARG DOWNLOAD_WEIGHTS=trueThis matches the convention already used by the
boltzcontainers in this repo (e.g.boltz/v2.2.1-2), which bake model weights into the image unconditionally. The weight-download logic (DOWNLOAD_WEIGHTS=truebranch) is pre-existing, downloadingboltz1_conf.ckptand LigandMPNN params from public URLs (Hugging Face,files.ipd.uw.edu). A slim ~3.5 GB-smaller build is still available via--build-arg DOWNLOAD_WEIGHTS=false(weights then bind-mounted at runtime).2. Add the missing
README.container.mdThe Dockerfile does
COPY README.container.md /README.md, but that file was never committed (only one commit44f61b4"Add SwitchCraft" added this container, without the README). As a resultdocker buildfrom current HEAD fails at theCOPYstep. Theengensandcf-randomcontainers each ship their ownREADME.container.mdnext to the Dockerfile; this adds the equivalent for switchcraft, documenting source, weights, GPU usage (apptainer--pwd /app --nvand docker--gpus), the example tasks, and output layout.Validation
docker build --checkon the edited Dockerfile → no warnings.pos_allosterydesign successfully (correct holo ligand placement, sensible Boltz confidence metrics), confirming the only thing the published image was missing is exactly what this PR bakes in.Trade-off
Image size grows by ~3.5–4 GB (Boltz-1 checkpoint + LigandMPNN params). This is consistent with the other weight-bearing images in this repo and is the price of a self-contained, runnable image. Users who want the smaller image can build with
--build-arg DOWNLOAD_WEIGHTS=false.