Skip to main content
A file system is a project-scoped, persistent file system you create once and mount into any number of sandboxes at an absolute path. Unlike a sandbox’s own file system, which is ephemeral and disappears when the sandbox is terminated, it lives independently of any sandbox’s lifecycle, so its contents persist across runs and are visible to every sandbox that mounts it. Use file systems to:
  • Share a common dataset, model, or cache across a fleet of sandboxes.
  • Keep working state (skills, checkpoints, outputs) around after a sandbox is gone.
  • Hand data between sandboxes without copying it through your machine.
A file system is distinct from a sandbox’s local ephemeral disk (see File Operations) and from Snapshots, which capture a point-in-time copy of one sandbox.

How it works

1

Create

Create a file system in your project. You get back an id of the form file_system_....
2

Mount

Mount it into a sandbox at an absolute, unique path — either at boot when you create the sandbox, or on a running sandbox.
3

Share and persist

Reads and writes under the mount path go to the file system. Mount the same file system into other sandboxes to share its contents; the data remains after each sandbox is terminated.

Create a File System

tl fs create --name skills --description "Skills shared across sandboxes"

List File Systems

tl fs ls

Delete a File System

tl fs rm file_system_bKtRcMWrzcRTRGfmMhgDc

Mount at Boot

Mount one or more file systems when you create a sandbox. Each mount needs the file system id and an absolute, unique path inside the sandbox.
# Repeat -f / --filesystem to mount more than one
tl sbx create \
  --filesystem file_system_bKtRcMWrzcRTRGfmMhgDc:/mnt/skills

Attach and Detach on a Running Sandbox

Mount or unmount a file system on a sandbox that is already running. The mount/unmount completes asynchronously; the returned sandbox info reflects the updated mounts.
tl sbx fs attach <sandbox-id> \
  --id file_system_bKtRcMWrzcRTRGfmMhgDc \
  --path /mnt/skills

tl sbx fs detach <sandbox-id> --path /mnt/skills

List Mounts on a Sandbox

tl sbx fs ls <sandbox-id>

Share Data Across Sandboxes

Because a file system is independent of any single sandbox, mounting the same one into multiple sandboxes gives them a common, persistent workspace.
from tensorlake import create_file_system
from tensorlake.sandbox import Sandbox, FileSystemMount

fs = create_file_system("dataset")
mounts = [FileSystemMount(file_system_id=fs.id, mount_path="/data")]

# Producer writes to the file system
producer = Sandbox.create(file_systems=mounts)
producer.write_file("/data/input.csv", b"id,value\n1,42\n")
producer.terminate()

# A later, separate sandbox reads the same data — it survived the producer
consumer = Sandbox.create(file_systems=mounts)
print(bytes(consumer.read_file("/data/input.csv")).decode())

Best Practices

  • Use absolute, unique mount paths (for example /mnt/skills, /data); two mounts on the same sandbox cannot share a path.
  • Keep large, reusable assets (datasets, model weights, caches) on a file system instead of rebaking them into every Sandbox Image.
  • Treat the file system id (file_system_...) as the stable handle; mount paths are per-sandbox.

Learn More

File Operations

Read, write, and copy files on a sandbox’s local filesystem.

Snapshots

Capture and restore a single sandbox’s filesystem, memory, and processes.

Skills in Sandboxes

Pre-load skill files so coding agents discover them at startup.