snapshot

package
v2.0.0-beta.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package snapshot bakes a snapshot: it starts the engine in a donor container, warms it up, records a canary, exports the weights pool, puts the engine to sleep, checkpoints CUDA, dumps the process tree with CRIU, archives the trees it wrote and publishes everything with one manifest.

Index

Constants

View Source
const DriverCheckEnv = "__RM_NO_VERSION_CHECK"

DriverCheckEnv is set in the engine at build time: it makes the NVIDIA driver skip its client/kernel version comparison. libcuda remembers the kernel module version it met at init and presents it again when cuda-checkpoint restores, so without it a snapshot restores only under the exact driver it was built on. With it, a restore under another release of the same branch works; another branch is still refused by the kernel module.

View Source
const EngineAddr = "127.0.0.1:8000"

EngineAddr is where the engine listens inside its container.

View Source
const EngineLog = guestWorkspace + "/logs/engine.log"

EngineLog is the engine's log file, in a tree the snapshot carries: a restored engine keeps writing it.

Variables

This section is empty.

Functions

func AgentConfig

func AgentConfig(state string) agent.Config

AgentConfig is what every agent needs, its sockets in state: the image's CRIU and cuda-checkpoint, the engine's address and the trees.

func Describe

func Describe(m manifest.Manifest) string

Describe is a one-line summary of a published snapshot.

func Hardware

func Hardware(table profile.HardwareTable, gpus []host.GPU, ranks int) (profile.Hardware, error)

Hardware finds the hardware row of the selected GPUs: all of one model, as many as the profile has ranks.

func Publish

func Publish(ctx context.Context, s store.Store, sources []source, output string,
	workers int) ([]manifest.File, error)

Publish stores and links every source with up to workers files at once and returns the manifest's file list, sorted by path.

func Run

Run bakes and returns the published manifest.

func ServedName

func ServedName(options map[string]any) (string, error)

ServedName is the first served model name of a launch.

func Surviving

func Surviving(exported []manifest.Allocation, table []vllm.Allocation) ([]manifest.Allocation, int)

Surviving keeps the exported allocations the asleep table still has, renumbered, and reports how many went.

func Tools

func Tools(work, criuPath, helperPath string) (agent.Config, error)

Tools fills a container agent's config and puts this binary and the optional host CRIU and cuda-checkpoint into work.

Types

type Options

type Options struct {
	Profile        string
	ProfileDirs    []string
	ModelDir       string
	GPUs           string
	Output         string
	ID             string
	StateDir       string
	DockerSocket   string
	CRIU           string
	CUDACheckpoint string
	// Cuinterpose is a cuInterpose build directory, for profiles whose ipc
	// is not native; default: cuinterpose/ next to this executable.
	Cuinterpose  string
	Set          []string
	NoVerify     bool
	PartBytes    int64
	Threads      int
	ReadyTimeout time.Duration
	// CPUTest runs without GPU devices or the io_uring check: the
	// end-to-end test on a CPU host with a stand-in engine.
	CPUTest  bool
	Version  string
	Progress *run.Progress
}

Options of one bake.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL