Image definition.
Base Images
We provide two base images by default:ubuntu-minimal: A minimal Ubuntu image which doesn’t include systemd, it boots up in a few hundred milliseconds. If you want to optimize cold boot times, use this image.ubuntu-systemd: A Ubuntu image which includes systemd, which offers the flexibility of installing packages like Docker and Kubernetes inside the sandbox.
ubuntu-minimal is the default base image.
Building Custom Images
You can build a custom image on top of the base images using the tensorlake SDK. When you build an image, Tensorlake:- Loads an image file and discovers the
Imagedefinitions attached to its functions. - Starts a temporary sandbox from the image’s base container.
- Replays the image build steps inside that sandbox, including
run(),env(),copy(), andadd(). - Creates a snapshot of the prepared sandbox.
- Registers an image name for that snapshot in your current project.
tl sbx new --image <name>.
We are planning on supporting building custom images from Dockerfiles in the future.
Prerequisites
Images are scoped to the project selected in the CLI. Before creating one, make sure you have:Define an Image
Define an image in an application file and attach it to at least one function so the CLI can discover it.image.py
Create an Image
Create the image from the image file:--registered-name defaults to the image name if you omit it. Registered image names must be unique within a project.
Launch Sandboxes from a custom image
Create a new sandbox from the registered image name:Notes
- If an image file has more than one image,
--image-nameis required. copy()andadd()sources are read from the local filesystem when you runtl sbx image create.- Named image creation and lookup are available in the CLI.
See Also
Snapshots
Understand the underlying snapshot primitive used to save and restore sandbox state.
Lifecycle
Learn which sandbox settings you can still override when launching from an image.
Skills in Sandboxes
Ship TensorLake SDK docs inside sandbox images for agents and tools.