shem
Run containers and VMs inside a model’s weights.
shem treats the host as a hypervisor and a model as the machine. The model supplies a CPU, compiled into its weights, and RAM, which is its recurrent state. The host supplies everything else: system calls, devices, scheduling and storage. Images are standard OCI images, built from Shemfiles with shem build or docker build, and they can carry a running guest, a booted kernel or a primed language model session.
Quick start
curl -fsSL https://jgalego.github.io/shem/install.sh | sh
shem run ghcr.io/jgalego/shem/hello:latest
From a repository checkout, with uv installed:
shem build -t qwen3 examples/qwen3
shem run qwen3 "What is a golem?"
Programs use the reference interpreter by default. --vcpu neural selects a standalone RV32IM network with compiled weights; it needs a neural server. Language-model sessions use PyTorch, not the vCPU.
Guides
| Task | Guide |
|---|---|
| Import a model, save a session or add tools | Model images |
| Build, push and pull images | Shemfile |
| Run with Docker or containerd | containerd and Docker |
| Configure nodes or mount model images | Kubernetes |
| Run on Windows without WSL | Windows |
| Boot Linux or save a booted VM | VM mode |
| Run and benchmark the compiled CPU | Neural vCPU |
| Understand the runtime and its limits | Architecture |
shem is experimental, and not fast: the project README says when to use it, and when not to, against Ollama, Docker Model Runner, RamaLama and KitOps.
The source is at github.com/JGalego/shem.