Skip to content

docs(docker): ship a NOTICE recording what the images contain - #57

Open
bowen-bd wants to merge 1 commit into
learningmatter-mit:mainfrom
bowen-bd:docs/docker-notice
Open

bowen-bd wants to merge 1 commit into
learningmatter-mit:mainfrom
bowen-bd:docs/docker-notice

Conversation

@bowen-bd

Copy link
Copy Markdown
Collaborator

What

Adds docker/NOTICE.md, copies it into every image, and points the container README at it.

The published images are now public (ghcr.io/learningmatter-mit/atomisticskills-{cpu,mlip,fairchem,generative}), so anyone can pull them anonymously. That makes "what exactly is inside this artefact" a question readers can ask, and one we should be able to answer in writing.

Two facts it records

1. The images carry no model weights. Every MLIP checkpoint is fetched at run time into the mounted model cache (HF_HOME, TORCH_HOME, MATGL_CACHE). Three mechanisms hold that: .dockerignore excludes *.pt/*.pth/*.ckpt/*.traj/*.h5 and **/.venv/; the Dockerfiles copy only src/, skills/, venv/ and docker/; /opt/model-cache is a VOLUME, empty at build.

This is load-bearing for FAIRChem. facebook/UMA is gated: manual with licence other (FAIR Chemistry licence); fairchem-core calls hf_hub_download(repo_id="facebook/UMA") with the caller's own HF_TOKEN after access is granted. Without a token, load_model fails with 401 — intended behaviour. The two .pt files inside fairchem-core (Jd.pt, 22 KB; wigner_d_coefficients.pt, 30 KB) are precomputed Wigner-D constant tables in the MIT-licensed wheel, not weights.

2. Three dependencies are strongly copyleft, measured per image rather than assumed:

Package Version Licence Images
pymupdf 1.28.2 AGPL-3.0 or Artifex commercial cpu, mlip, fairchem
openbabel-wheel 3.1.1.23 GPL cpu, mlip, fairchem, generative (adit only)
python_hostlist 2.3.0 GPL-2.0+ mlip

pymupdf extracts PDF text in the paper-download and synthesis-extraction paths; openbabel-wheel ships the obabel CLI that the docking skills invoke (venv/run cpu obabel ...), which is why it is a dependency without a single import openbabel in the tree.

Why it is copied into the image

docker/NOTICE.md joins the COPY line in both Dockerfiles, so the notice travels with the artefact it describes instead of living only in the repository.

Also records the rule

No build step may pre-download weights. That would convert a permitted run-time download into a redistribution the model licences do not allow, and would add gigabytes to every image. The README carries a one-liner that verifies a built image against this:

docker run --rm --entrypoint sh <image> -c 'ls -A /opt/model-cache; \
  find / -xdev \( -name "*.ckpt" -o -name "*.safetensors" \) -size +20M'

The text is an inventory and stays out of legal conclusions; it says so explicitly.

Verification

  • pytest tests/test_*.py (CI cpu scope): 1090 passed, 5 skipped — unchanged from before this branch
  • pytest tests/test_images_and_manifests.py: 34 passed, including the check that every path the Dockerfiles COPY exists
  • docker/render.py servers --check, docker/render.py plugin-mcp --check, tools/sync_version.py --check: all up to date
  • No weights in a built image, checked directly on the published generative:2.0.0: no ≥20 MB *.pt/*.ckpt/*.safetensors anywhere, /opt/model-cache empty

Note this touches docker/Dockerfile, so the affected-image rule selects every image for rebuild.

The images carry no model weights: every MLIP checkpoint is fetched at run
time into the mounted model cache. That is load-bearing for FAIRChem, whose
UMA checkpoints are a gated repository (manual approval, FAIR Chemistry
licence) that fairchem-core downloads with the caller's own HF_TOKEN — an
image shipping them would be redistributing them.

What the images do carry is software from PyPI, most of it permissive, plus
three strong-copyleft packages: pymupdf (AGPL-3.0 or commercial) and
openbabel-wheel (GPL) in cpu, mlip and fairchem, and python_hostlist
(GPL-2.0+) in mlip. Record that inventory per image, say where the
corresponding source is, and state the rule that no build step may
pre-download weights.

docker/NOTICE.md is copied into every image next to the server map, so the
text travels with the artefact it describes rather than living only in the
repository. The README gains a section pointing at it, with a command that
verifies a given image carries no checkpoints.

This branch has not been deployed

No deployments
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