Templates & Docker images
A template is a registered environment that Collimate spawns VMs from. Your
environment is probably already a Docker image (an eval harness, a SWE-bench instance, a browser
stack, a conda setup). Upload it once, and every /v1/exec and every session spawns a VM
from it. The image runs unmodified: its entrypoint, environment variables, and
working directory behave exactly like docker run.
Your image, unchanged
Collimate does not rewrite your image or require a special base. It preserves the image's own runtime
configuration, so a command resolves against the image's own PATH and interpreter just
as it would under Docker. SWE-bench's python -m pytest … works against a conda layout
with zero per-image configuration.
Works for any image, not one blessed layout. Bring your existing training and eval environments as-is. What you tested under Docker is what runs as a Collimate VM.
From image to running VM
You pay the registration cost once. After that, every rollout is a sub-millisecond VM spawn.
ONE-TIME PER ROLLOUT your Docker image -> POST /v1/templates -> ready template -> VM · VM · VM … (eval / browser / conda) building -> ready <1 ms each, ~141 KB each
Register a template
Send your environment image as the request body. The build runs in the background and returns
202 immediately. Template management requires a scale key
(col_scale_…); a standard key gets 403. Sizing and build options are passed
as query parameters.
curl -X POST 'https://api.collimate.ai/v1/templates?id=my-env&mem_mib=512&vcpu_count=1&wait_secs=15' \
-H 'Authorization: Bearer col_scale_...' \
-H 'Content-Type: application/octet-stream' \
--data-binary @my-env-image
# 202 Accepted
{ "id": "my-env", "status": "building" }
template_id you will spawn VMs from. [a-zA-Z0-9_-], 1-64 chars.application/octet-stream (streamed, so multi-GB images are fine).Producing the image from your Docker image is a one-time step we walk you through during onboarding. Once you have it, the API above is all you need; the build boots it once and freezes a warm, ready-to-spawn template.
Poll until ready
Status moves building → ready, or failed with a readable error (never a crash). Poll until ready, then the template is ready to spawn VMs.
GET /v1/templates/my-env
Authorization: Bearer col_scale_...
200 OK
{ "id": "my-env", "status": "ready", "created_at_secs": 1717200000 }
# while building: { "id": "my-env", "status": "building" }
# on failure: { "id": "my-env", "status": "failed", "error": "..." }
List, inspect & evict
GET /v1/templates
200 OK
{ "templates": { "my-env": { "ready": true }, "python": { "ready": true } } }
DELETE /v1/templates/my-env (scale key)
204 No Content
Templates are managed live, with no server restart. Evicting a template that still has in-flight VMs is safe: the running VMs finish, then resources are reclaimed.
Spawn VMs from it
Once ready, reference the template by template_id anywhere: stateless execs, batches, or sessions. Every call spawns a VM from the warm template.
r = sb.run("python -m pytest -x", "my-env") # spawns your image, runs like docker run
print(r.exit_code, r.stdout)curl -X POST https://api.collimate.ai/v1/exec \
-H 'Authorization: Bearer col_live_...' \
-d '{"code":"python -m pytest -x","template_id":"my-env"}'Errors
col_scale_…).id (the registry never overwrites an existing template).Why it fits RL eval
Reuse your eval harness
The same images you use for offline eval (SWE-bench, browser benchmarks) become online, spawnable RL environments. No reimplementation, no drift between eval and training.
One image, thousands of VMs
All VMs spawned from a template share its base copy-on-write, so a hundred concurrent rollouts of the same heavy image still cost only the pages each one changes.