Foundational Compute

Templates

A template sets the system, files and size of a sandbox. Use a ready one, or build your own from a Dockerfile.

Ready templates

With no name, Sandbox.create() and fdtn create use base.

TemplateSizeFree diskPriceWhat is inside
base2 vCPU, 512 MiB5 GiB$0.039/hDebian 12, Python 3.11, Node.js 20, git, curl
small2 vCPU, 512 MiB5 GiB$0.039/hUbuntu 24.04, Python 3.12, git
claude2 vCPU, 2 GiB20 GiB$0.048/hDebian, Node.js 24, Python 3, Claude Code, git, ripgrep. Runs on our own machines. Coding agents

Coding agents also come in larger sizes: claude, codex and opencode with -2vcpu-4gib, -4vcpu-8gib or -8vcpu-16gib (for example claude-4vcpu-8gib). Every coding-agent template has 20 GiB of disk. Only plain claude stays on our own computers; for a sized one, add --trusted or metadata fdtn_own_fleet_only=1. The Templates page in the portal shows the current list.

Install more tools at run time with pip, npm or apt-get (as root). For large installs, build a template with more memory.

An unknown template name fails with 404. fdtn template ls lists your templates.

A build is free. At a spending limit, new builds stop (Limits). You do not need Docker.

1Write a Dockerfile

Save as Dockerfile in an empty folder:

Dockerfile
FROM python:3.13-slim-bookworm
RUN pip install --no-cache-dir pandas
WORKDIR /app
  • fdtn reads fdtn.Dockerfile first, then Dockerfile.
  • FROM images come from docker.io, ghcr.io or quay.io.
  • Use an image with an arm64 build, such as the official Python, Node.js, Debian and Ubuntu images.

2Build the template

$ fdtn template create my-app
Using ./Dockerfile
Building template my-app...
...
Template my-app is ready.
Start a sandbox from it with: fdtn create my-app

The first build takes a minute or more. Later builds cache unchanged steps. If a step fails, fix it and run again (errors).

OptionWhat it does
-dDockerfile path
--cpu-countvCPU, default 2
--memory-mbMemory, default 1024
--cmd, --ready-cmdStart command and its ready check

An existing name rebuilds that template. All options

$ fdtn template create web --cmd "node /app/server.js" --ready-cmd "curl -sf http://localhost:3000"

Names: lowercase letters, numbers, dashes and underscores, up to 128 characters. After Ctrl-C, the build can still finish.

3Check the template

$ fdtn template list

Start sandboxes only when the build is ready.

4Start a sandbox from it

Python · TypeScript · CLI

from fdtn import Sandbox

sbx = Sandbox.create("my-app", request_timeout=120)
print(sbx.commands.run("python -c 'import pandas; print(pandas.__version__)'").stdout)
sbx.kill()

The first start on a computer can take up to a minute. Later starts take less than 500 ms.

Sizes

For another size, build another template.

ResourceChoicesDefault
vCPU1 to 162
MemoryUp to 32 GiB, in 512 MiB blocks1 GiB
DiskFree. 5 GiB up to 512 MiB memory, 10 GiB up to 2 GiB, else 20 GiB.10 GiB

Prices: Pricing. A large size can wait in the queue until a computer has its memory free.

Build from code

Python · TypeScript

build.py
from fdtn import Template

template = (
    Template()
    .from_image("python:3.13-slim-bookworm")
    .run_cmd("pip install --no-cache-dir pandas")
)
Template.build(template, "my-app", cpu_count=2, memory_mb=4096)

fdtn template init -n my-app -l python-sync makes a starter folder with build scripts. Run the commands it prints; fdtn template create reads only Dockerfiles.

Delete a template

$ fdtn template delete my-app          # asks first
$ fdtn template delete a b --yes       # no question, for scripts

Limits

  • COPY uploads: 1 GiB each (413), 10 GiB per workspace per UTC day (429). Download large files in a RUN step.
  • Build logs: fdtn template build logs <template-id> <build-id>. fdtn template create prints both IDs.

Next