Core platform

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.

__ICO_docker__

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 once, then spawn a VM on every /v1/exec or /v1/sessions call against that template_id

Register a template

POST/v1/templates

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.

bash
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" }
id
string, required · the template_id you will spawn VMs from. [a-zA-Z0-9_-], 1-64 chars.
mem_mib
int, optional · VM memory in MiB. Default 512.
vcpu_count
int, optional · vCPUs per VM. Default 1.
wait_secs
int, optional · seconds to let the environment boot during the one-time build. Default 15.
body
Your environment image, sent as application/octet-stream (streamed, so multi-GB images are fine).
__ICO_book__

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

GET/v1/templates/{id}

Status moves building → ready, or failed with a readable error (never a crash). Poll until ready, then the template is ready to spawn VMs.

http
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
DELETE/v1/templates/{id}
http
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

401
Missing or invalid key.
403
Key is not a scale key (template management requires col_scale_…).
409
Duplicate id (the registry never overwrites an existing template).
503
Template builds are not enabled on this deployment.

Why it fits RL eval

__ICO_docker__

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.

__ICO_layers__

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.

Related