Skip to content

Packaging

Four release artifacts, one per audience, all published to the R2 bucket and pulled with curl … | tar xz. Everything is written to dist/ (gitignored); run these from the repo root.

Artifact For Contents
gridweave-latest.tar.gz deploying a master the whole core/ tree (minus dev/build junk)
gridweave-worker-latest.tar.gz a GPU node join/update scripts, worker Dockerfiles, and gpu_support — enough to build the worker image locally
gridweave_sdk-<version>-py3-none-any.whl users (pip install) the standalone SDK (httpx + cloudpickle only)
gridweave-sdk.tar.gz new users the SDK wheel + onboarding notebooks

Build

Master — the full tree, with the webui's local build artifacts excluded (they balloon it from ~280 KB to ~105 MB on a machine that's run npm install):

mkdir -p dist
tar czf dist/gridweave-latest.tar.gz \
  --exclude='.git' --exclude='.venv*' --exclude='__pycache__' --exclude='.pytest_cache' \
  --exclude='.DS_Store' --exclude='.claude' --exclude='*.db' --exclude='core/dist' \
  --exclude='node_modules' --exclude='.next' --exclude='*.tsbuildinfo' \
  -C .. core/

GPU worker — the minimal build kit each node needs, exactly the paths listed in deploy/worker-files (the Matrix ships the same list to the nodes it joins). Never add a whole deploy/ directory: it holds the master's .env.

mkdir -p /tmp/gpu-worker/core
tar -cf - --exclude='__pycache__' -T deploy/worker-files | tar -xf - -C /tmp/gpu-worker/core
tar czf dist/gridweave-worker-latest.tar.gz -C /tmp/gpu-worker core/ && rm -rf /tmp/gpu-worker

SDK wheel — httpx + cloudpickle only, so import gridweave works without cloning core/:

cd client_sdk && python3.12 -m build --outdir ../dist && cd ..

Onboarding bundle — the wheel + the user notebooks, extracts to gridweave-sdk/:

mkdir -p /tmp/onboarding/gridweave-sdk
cp notebooks/onboarding.ipynb notebooks/examples_practitioner.ipynb notebooks/examples_hard.ipynb \
   dist/gridweave_sdk-*.whl /tmp/onboarding/gridweave-sdk/
tar czf dist/gridweave-sdk.tar.gz -C /tmp/onboarding gridweave-sdk/ && rm -rf /tmp/onboarding

Versioning

VERSION_SDK, VERSION_SERVER, VERSION_WORKER at the repo root hold the current versions (all 0.3.23 today). The server and worker enforce a major-version match — a client or worker one major off is rejected (426) — so a release usually bumps all three together. For the SDK: bump VERSION_SDK (the runtime version; client_sdk/__init__.py reads this file) and client_sdk/pyproject.toml (which names the wheel), then update sdk-latest-version.txt in the bucket so the "latest wheel" install resolves.

Publish

Upload the dist/ artifacts to the R2 bucket and enable its Public Development URL for the pub-*.r2.dev/tarball/… links the install commands use. How to install each artifact is documented where it's consumed — deploy (master + worker) and the SDK (wheel + onboarding).