Skip to main content
Templates let you prepare dependencies once and launch machines from the resulting environment.

Build from Python

The start command runs during template build before snapshotting. Machines created from the template restore that ready running state instead of rerunning the command at create time. Warm pools use that same ready snapshot as their boot contract. Keep services poolable by putting required startup envs in template runtime defaults and by using readiness probes that succeed before snapshotting. Create-time envs, volumes, cwd overrides, desktop settings, and per-create networking options are not available to the prewarmed service boot path. Create and wait for a template warm pool through the SDK:
Template.create_warm_pool(...) is available when you already have a template object. See Template Warm Pools for checkout modes, status fields, and drain behavior.

Build-time and runtime envs

Nullspace deliberately separates env lifetime: set_runtime_envs() values are also visible during later child template builds as inherited defaults. set_build_envs() does not persist into launched machines.

Sources

For private registries, configure registry auth before build:
Use set_file_context() for local Dockerfile-style copy contexts, and use to_json() or to_dockerfile() to inspect the generated template before building.

Build options

The same resource and cache options are available on Template.build_in_background() and builder.to_json(...).

Build logs

Fetch build logs after starting a template build:
Native-backend Dockerfile instructions ignored with warning log entries: EXPOSE, VOLUME, ARG, LABEL. BuildKit-backed Dockerfiles use BuildKit failure and progress output instead. Ignored-instruction warnings include the Dockerfile line number and appear in the same structured build log stream used by TemplateBuild.get_status() and nullspace template logs.

Background builds

Namespaces, reserved names, tags, aliases, and visibility are documented in Tags, Names, And Visibility. Use Template.list(fields=["id", "canonical_ref"]) and Template.get("team/template:tag", fields=["id", "canonical_ref"]) for compact raw dictionaries when a control plane page only needs selected fields. Concept: Create. API reference: buildTemplate, startTemplateBuild, getTemplateBuildStatus, and listTemplates.