Skip to content

feat(app): container-based launch + --app-version on shared DCV base AMI (#290) - #260

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/290-spawn-container-launch
Jun 26, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/290-spawn-container-launch

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

What

Phase C of the #290 container-catalog pivot (depends on libs v0.38.0, merged). spawn app launch <app> now runs the app's Docker image on the shared spore-dcv-base AMI instead of a baked per-app AMI — structurally retiring the per-app, per-region AMI table whose IDs were all found dangling/unshared from the launch account (#389).

Changes

  • AMI/image resolution: resolve entry.BaseAMIs[region] (the deleted per-app entry.AMIs is gone) + image tag via catalog.ResolveTag(--app-version).
  • Container user-data: buildContainerDCVUserData pre-pulls the image, then runs docker run --rm [--gpus all] -e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix <image>:<tag> as the DCV session --init. Pre-pull hides cold start before dcv create-session.
  • Refactor: containerInitCommand is pure/table-tested; buildDCVUserData and the container builder now share one script core (buildDCVUserDataWithInit), so the legacy launch_command path is byte-for-byte unchanged (guarded by TestBuildDCVUserData_LegacyUnchanged).
  • --app-version <tag> flag — validated against the catalog, rejected for non-container apps.
  • spawn app list gains a VERSION column (default tag, (+) when alternates exist; — for not-yet-containerized apps).

Tests

TestContainerInitCommand (GPU/CPU), TestBuildContainerDCVUserData (pre-pull + GPU + session init), TestBuildDCVUserData_LegacyUnchanged. make check green, tier-0 coverage gate green, existing phase-3 substrate tests still pass.

Not in this PR

Refs #290, #389.

…AMI (#290)

spawn app launch now runs a catalog app's Docker image on the shared
spore-dcv-base AMI instead of a baked per-app AMI:

- Resolve entry.BaseAMIs[region] (not the deleted per-app entry.AMIs) and the
  image tag via catalog.ResolveTag(--app-version).
- buildContainerDCVUserData pre-pulls the image and uses a `docker run` (--gpus
  all for GPU apps, X socket bind-mounted) as the DCV session --init.
- containerInitCommand is pure/table-tested; buildDCVUserData refactored to share
  one script core (buildDCVUserDataWithInit) so the legacy launch_command path is
  byte-for-byte unchanged (guarded by a test).
- --app-version flag (validated against the catalog; rejected for non-container
  apps); `spawn app list` gains a VERSION column.

Requires libs v0.38.0 (container catalog schema). Refs #290, #389.
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.00000% with 35 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/app.go 30.00% 35 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 8dabc78 into main Jun 26, 2026
6 of 7 checks passed
@scttfrdmn
scttfrdmn deleted the feat/290-spawn-container-launch branch June 26, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant