SYSTEM Cited by 1 source
Livebook¶
Livebook is an Elixir notebook environment — Elixir's answer to Jupyter Notebooks — but with one architectural difference that matters for this wiki: it can attach its runtime to any Erlang/Elixir cluster and leverage BEAM's native code-distribution primitives to make the notebook feel like local code while running compute on arbitrarily many remote nodes.
Key architectural properties¶
- Runtime is clusterable to remote BEAM nodes. A Livebook running on a user's laptop can spin up a runtime on a Fly Machine in the user's Fly.io org and drive compute against it; alternatively the runtime can attach to an already-running Elixir application for introspection/debug. (Source: sources/2024-09-24-flyio-ai-gpu-clusters-from-your-laptop-with-livebook)
- Notebook-to-cluster code sync is automatic. "Livebook will automatically synchronize your notebook dependencies as well as any module or code defined in your notebook across nodes." User-defined modules are callable from anywhere in the cluster without a build step. Canonical instance of concepts/transparent-cluster-code-distribution. (Source: same)
- Auto-completion comes from the remote node. When a runtime is attached to a remote cluster, Livebook's completion results come from modules defined on the remote node, not from a local index. The notebook is a thin client over BEAM's introspection primitives.
- FLAME-driven elastic execution. Code
cells can issue
Flame.callblocks that spawn additional compute nodes on demand, with the framework managing pool size and lifecycle. Combined with Livebook's code-sync this means a cell can dispatch its own locally-defined function across an ephemeral cluster. - Kubernetes-side parity (v0.14.1). Michael Ruoss contributed runtime + FLAME support on K8s, so the same Livebook-driven elastic-compute workflow runs on Kubernetes clusters (Pods instead of Fly Machines).
Seen in¶
- sources/2024-09-24-flyio-ai-gpu-clusters-from-your-laptop-with-livebook — canonical Livebook source on the wiki; covers notebook-driven GPU cluster workflows (64-node BERT hyperparameter tuning, Llama-over-video-stills pipeline) and the Fly.io + K8s runtime integrations.
Related¶
- systems/flame-elixir — the elastic-executor-pool framework Livebook composes with for scaling beyond the runtime Machine.
- systems/nx-elixir — the Elixir AI/ML stack used in notebook workflows.
- systems/erlang-vm — the BEAM primitives Livebook depends on for clusterable runtimes and code distribution.
- systems/fly-machines — a runtime host; one of two supported backends (the other is Kubernetes).
- systems/kubernetes — v0.14.1+ alternative runtime backend.
- concepts/transparent-cluster-code-distribution — notebook-defined modules executable anywhere in the cluster.
- patterns/notebook-driven-elastic-compute — the architectural pattern Livebook + FLAME + Fly Machines instantiate.