Checkpoint
checkpoint() snapshots VM memory and writable disk while keeping the Sailbox
running:
checkpoint() after important setup, such as installing packages,
fetching remote data, or writing files. On host failure, Sail restores from the
most recent completed checkpoint and does not replay commands that ran before
that checkpoint.
Fork
fork() creates a separate running Sailbox from the current in-memory process
state and writable disk:
Pause
pause() checkpoints the Sailbox and powers it down until you explicitly resume
it:
Sleep
sleep() checkpoints the Sailbox and powers it down until network ingress,
exec, or an explicit resume wakes it:
Sleep during inference
To automatically sleep a Sailbox while a foreground Sail inference call is in flight, include its ID in the request with theX-SailboxId header. Sail will
resume the Sailbox after the inference call completes.
Resume
resume() restores a paused or sleeping Sailbox and returns an updated handle:
Sailbox.connect() also verifies placement and resumes a paused or sleeping
Sailbox before returning:
Terminate
terminate() permanently destroys the Sailbox:
pause() or sleep() when you want to keep
the VM state for later.