Sandbox images let you prebuild dependencies, files, and environment setup once, then launch fresh sandboxes from that prepared state. They are project-scoped named images backed by a sandbox snapshot. You can define them in Python, TypeScript, or a raw Dockerfile.Documentation Index
Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
Use this file to discover all available pages before exploring further.
Base Images
We provide four base images:ubuntu-minimal(default): 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.debian-minimal: A minimal Debian 13 image.
ubuntu-vnc: A desktop-enabled Ubuntu image based onubuntu-systemdwith XFCE, TigerVNC, and Firefox preinstalled. Use it for browser automation and computer-use workloads. See Computer Use.
Building Custom Images:
You can build a custom image on top of the base images from Python, TypeScript, or a raw Dockerfile. When you build an image, Tensorlake:- Parses the image definition DSL and local source context.
- Starts a temporary sandbox from the selected base image.
- Translates supported build operations such as
run,copy,add,env, andworkdirinto sandbox build steps and executes them there. - Creates a snapshot of the prepared sandbox.
- Registers an image name for that snapshot in your current project.
tl sbx new --image <name>.
Prerequisites
Images are scoped to the project selected in the CLI. Before creating one, make sure you have:- Python
- TypeScript
tl init.
Installing Python packages
The base Ubuntu and Debian images ship a PEP 668–managed system Python, sopip install requires --break-system-packages (or an explicit virtualenv). The flag in the examples below is a requirement, not a stylistic choice — without it, pip exits with error: externally-managed-environment.
Use this pattern for ad-hoc packages at runtime, when you don’t have a requirements.txt:
- Python
- TypeScript
requirements.txt, see the image-build examples in Define and register the Image below.
Define and register the Image
You can define images using the Python and Typescript APIs or as Dockerfiles.- CLI
- Python SDK
- TypeScript SDK
Dockerfile
Compute and Storage Configuration
You can specify CPU, Memory and Disk parameters when building images to get bigger sandboxes where images are built. The disk size also carries over to sandboxes launched from that image, so you can use it to prepare images with large dependencies.- CLI
- Python SDK
- TypeScript SDK
cpus=2.0, memory=4096 MB, and disk=10 GiB. Override them with --cpus / --memory / --disk_mb in CLI or cpus / memoryMb / diskMb in SDK options.
Skills Image Example
This variant preloads the TensorLake skills repo so coding agents can auto-discover it at startup:Dockerfile
Dockerfile, the registered name defaults to the parent directory name. Otherwise it defaults to the file stem. Registered image names must be unique within a project.
Launch Sandboxes from a custom image
Create a new sandbox from the registered image name. You can still choose CPU, memory, timeout, entrypoint, and disk when the sandbox starts.- CLI
- Python
- TypeScript
Supported Build Operations and Limitations
Across the supported image-definition DSLs, TensorLake currently materializes these build operations into the sandbox:RUNWORKDIRENVCOPYADD
CMDENTRYPOINTEXPOSEHEALTHCHECKLABELSTOPSIGNALVOLUME
ARGONBUILDSHELLUSER
- Multi-stage Dockerfiles are not supported yet.
FROMmust reference a base image that TensorLake can launch as a sandbox, such astensorlake/ubuntu-minimalortensorlake/ubuntu-systemd.COPYandADDsources are read from the local filesystem relative to the Dockerfile build context.COPYandADDcurrently assume a local build context. Remote URLs and advanced BuildKit-only features are not supported.tl sbx image createandcreateSandboxImage()both use the current authenticated project context.tl sbx image describeshows the registered Dockerfile and snapshot metadata for a sandbox image.
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.