fabric ·nu.cluster

Run your Nu program on a distributed cluster.

Wrap any Nu tree in Teleport. It runs on a remote worker, same code, cluster-scale compute.

Powered byRay

See it.

Provision workers by tag. Send any subtree to a tagged worker. Same shape as any other Nu tree.

Your program, running on the cluster.

nu.cluster lets you provision Ray workers as fabric services and teleport any part of your Nu tree onto them. The body does not know or care where it runs.

Wrap it with the cluster provider, point at a worker, done. No task decorators, no result futures to juggle.

train.py
python · 15 locpy
import nu
train_epoch = ... # your Nu tree
# spin up two Ray workers, then teleport a body to each
program = nu.Provide(nu.cluster.RayCluster, {"address": "auto"},
nu.ProvideList(nu.cluster.RayService, [
{"actor_name": "worker-0", "num_cpus": 4},
{"actor_name": "worker-1", "num_cpus": 4},
], nu.Sequential(
nu.cluster.Teleport(train_epoch, target=0),
nu.cluster.Teleport(train_epoch, target=1),
)),
)
nu.arun(program)

What you can do with it.

One import turns a laptop-shaped program into a cluster-shaped one.

push heavy work off

Send the slow parts to workers.

Model training, big data crunching, long-running jobs. Keep the driver light, let the cluster do the heavy lifting.

scale up

Same code, one worker or a hundred.

Add another entry to the worker list and target it. No rewrite, no framework switch. Prototype on one box, ship on the cluster.

named workers

Pin work to a role.

Ledger writer, indexer, ui host, anything. Provision each once, address by tag, send the right work to the right place.

Try Nu.

One command gets you the wheel with every fabric. Then follow the movies tutorial to build a real app in an afternoon.

01 Install

pip install "nustack-py[all]"

02 Run the demo

nu demo movies

03 Build your app

Browse examples

Like what you see?

The project is young. Star it, join the room, watch what we ship next.