Skip to content

Headless container-run library primitive (DCV-free docker run of an image ref) #353

Closed

Description

@scttfrdmn

Split out from #351 (the container-primitive ask; the LaunchResult Region/LaunchTime part shipped in #352).

Problem

There is no exported, importable primitive to launch a host and run a container image ref headlessly. Today all docker login / pull / run + ECR logic lives in package cmd (cmd/app.go, cmd/app_byo.go), is not importable, and is DCV-streaming-specific — the run wrapper wires DISPLAY/XAUTHORITY/X11 into the container (GUI session), not a headless runner. (These landed in v0.69.0 via #290 / #392, but stayed in cmd and DCV-bound.)

A library consumer that wants "provision a host and docker run <ecr-ref>" must hand-build the aws ecr get-login-password | docker login && docker pull && docker run <ref> string and pass it as LaunchConfig.JobArrayCommand (cloud-init) or via RunShellScript (SSM). That pushes ECR-login / --gpus all / registry-auth knowledge into every consumer.

Proposed shape (for discussion)

A pkg-level primitive — likely a LaunchConfig.ContainerImage (+ optional registry-auth mode, e.g. ECR vs public vs basic-auth) that Provision turns into the login/pull/run bootstrap user-data. No DCV, no X11. A consumer says "run this image ref" and gets host provisioning + docker run without assembling the command string.

Open questions:

  • Registry auth surface: ECR-only first (the common case), or a general auth mode?
  • GPU passthrough (--gpus all) inferred from instance type, or explicit?
  • Env / mounts / ports passthrough — how much to expose vs keep minimal.

Context

Filed from calque (spore-host/calque), consuming spawn as a Go library. Interim: calque hand-builds the command string and logs it as an integration leak. Not blocking; scoping a real primitive here.

/cc downstream: spore-host/calque · split from #351

Activity

  1. added
    enhancement
    area:launch
    on Jul 15, 2026
  2. added a commit that references this issue on Aug 7, 2026
    4306396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:launchenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions