Sandbox images let you prebuild dependencies, files, and environment setup once, then launch fresh sandboxes from that prepared state. An image is a project-scoped name backed by a filesystem snapshot. You can define one with a Dockerfile, the Python SDK, or the TypeScript SDK, then pass the registered name toDocumentation Index
Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
Use this file to discover all available pages before exploring further.
image= when creating sandboxes.
The usual flow is:
- Choose a base image.
- Define the setup steps with a Dockerfile or
Imageobject. - Build and register the image name in your project.
- Create sandboxes from that registered name.
Base Images
Tensorlake ships preconfigured base images that boot quickly and are tuned for common sandbox workloads:tensorlake/ubuntu-minimal(default sandbox image): Minimal Ubuntu without systemd. Use this when you want the fastest cold starts.tensorlake/ubuntu-systemd: Ubuntu with systemd. Use this when you need services such as Docker or Kubernetes inside the sandbox.tensorlake/debian-minimal: Minimal Debian 13.
tensorlake/ubuntu-vnc: Desktop-enabled Ubuntu based ontensorlake/ubuntu-systemd, with XFCE, TigerVNC, and Firefox preinstalled. Use it for browser automation and computer-use workloads. See Computer Use.
Build and Register an Image
You can define the same image with a Dockerfile, Python, or TypeScript. During a build, Tensorlake prepares a temporary builder sandbox, applies the setup steps, snapshots the prepared root filesystem, and registers the snapshot under the image name.- CLI
- Python SDK
- TypeScript SDK
Dockerfile
contextDir controls how relative copy() and add() sources are resolved in SDK builds. Dockerfile builds use the Dockerfile’s parent directory as the build context.
Build from an OCI Base
You are not limited totensorlake/* bases. The build base can be any standard OCI image reference, including python:3.12-slim, debian:bookworm-slim, node:22-alpine, ghcr.io/..., or public.ecr.aws/....
Dockerfile
py-data-tools use the registered sandbox image.
Private Registries
Registry credentials are read from your local Docker config file:~/.docker/config.json, or $DOCKER_CONFIG/config.json when DOCKER_CONFIG environment variable is set.
Any registry that works with docker login can be used here, including Docker Hub, GHCR, ECR, GCR, Quay, and self-hosted registries.
tl sbx image create. There is no separate environment-variable or programmatic registry-auth path today.
Launch Sandboxes from an Image
Create a sandbox from the registered image name. You can still override CPU, memory, disk, timeout, and entrypoint when the sandbox starts.- CLI
- Python
- TypeScript
We don’t support launching sandboxes directly from Docker images. They have to be exported into a Tensorlake registered image first, as described in the previous section. We are working on providing the ability to launch Docker images from public registry directly without registering with Tensorlake’s image
registry first.
Python Packages
The Tensorlake Ubuntu and Debian base images ship a PEP 668-managed system Python, sopip install requires --break-system-packages unless you create a virtual environment. Without it, pip exits with error: externally-managed-environment.
For one-off installs in a running sandbox:
- Python
- TypeScript
requirements.txt and install them during the image build, as shown in Build and Register an Image.
Build Resources
Image builds run inside a temporary builder sandbox. You can allocate more CPU, memory, or disk for that builder, and you can separately choose the root disk size of the generated sandbox image.- CLI
- Python SDK
- TypeScript SDK
disk_mb / diskMb sets the root disk size for sandboxes created from the registered image. builder_disk_mb / builderDiskMb only affects the temporary builder sandbox.
Build defaults are cpus=2.0, memory=4096 MB, and a generated root disk of 10240 MiB (10 GiB).
Register an Existing Snapshot as an Image
If you already have a completed filesystem snapshot, you can give it a reusable image name without rebuilding:--dockerfile is stored alongside the image so tl sbx image describe can show how it was built. Add --public to make the name resolvable from any namespace (see Public Images).
The snapshot must be in Completed status with a durable snapshot_uri; tl sbx image register rejects snapshots that haven’t finished uploading.
Inspect and List Registered Images
describe accepts either the registered image name or the underlying sandbox-template ID.
Public Images
By default a registered image is namespace-scoped. Pass--public, is_public=True, or isPublic: true to make the image name resolvable from any namespace. This is how the tensorlake/* base images work.
- CLI
- Python SDK
- TypeScript SDK
Examples
Skills Image
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.
Supported Build Operations and Limitations
We’re actively working on supporting full Dockerfile feature set.
FROMRUNWORKDIRENVCOPYADDARG
CMDENTRYPOINTEXPOSEHEALTHCHECKLABELSTOPSIGNALVOLUME
ONBUILDSHELLUSER
- Multi-stage Dockerfiles are supported, including earlier-stage
FROM,COPY --from=<stage>,COPY --from=<image>, andRUN --mount=...,from=<image>. tl sbx image createand SDK image builds 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.