5 · Install the SDK & run your first job¶
Python 3.12 required — your functions are shipped to the workers with cloudpickle, which won't unpickle across versions.
Install¶
# First run — the tarball also bundles the onboarding notebooks:
curl -sL https://pub-c48a651bbb2f42988602aa11bb9d9267.r2.dev/tarball/gridweave-sdk.tar.gz | tar xz
cd gridweave-sdk && python3.12 -m venv .venv && source .venv/bin/activate
pip install gridweave_sdk-*.whl jupyterlab
jupyter lab onboarding.ipynb
# Or into an existing env (Colab etc.) — always pulls the latest version:
V=$(curl -s https://pub-c48a651bbb2f42988602aa11bb9d9267.r2.dev/tarball/sdk-latest-version.txt)
pip install https://pub-c48a651bbb2f42988602aa11bb9d9267.r2.dev/tarball/gridweave_sdk-${V}-py3-none-any.whl
Authenticate and run¶
Use the token from signup or onboarding, and your
platform URL (https://platform.… after HTTPS, else
http://<MASTER_IP>:8100):
import gridweave
gridweave.auth("YOUR_TOKEN", platform_url="https://platform.example.com")
gridweave.resources() # nodes, vendors, and free VRAM
@gridweave.remote(vram="4GB") # no vram → CPU; vram → a GPU with ≥4 GB free
def matmul():
import torch
x = torch.randn(4096, 4096, device="cuda")
return (x @ x).mean().item()
matmul.run()
Going further¶
- Full SDK reference — client_sdk/README.md: fractional/multi-GPU,
train(),serve()(vLLM + custom images),gather(), storage. onboarding.ipynb(in the tarball) — walks every capability end to end.- LLM-ready docs — your deployment serves its own docs at
https://app.…/docs, with a downloadablellms.txt: paste it into an LLM and ask it to build a notebook for your workload.
Next: 6 · Update the cluster — ship new versions without losing state.