Skip to content

Add Docker workflows for GPU training, serving and offline deployment - #25

Open
KraHsu wants to merge 7 commits into
mainfrom
docker/open-source-support
Open

Add Docker workflows for GPU training, serving and offline deployment#25
KraHsu wants to merge 7 commits into
mainfrom
docker/open-source-support

Conversation

@KraHsu

@KraHsu KraHsu commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

OpenWAM currently requires a manually prepared Python/CUDA environment. This adds a pinned CUDA 12.8, Python 3.12 and PyTorch 2.7.1 image for serving, training and source development, plus offline delivery to GPU hosts without internet access.

Changes

  • Add Compose services for serving, training, development and GPU checks, with loopback serving by default and optional host networking. Make and Compose share image selection through .env, environment variables and Compose overrides.
  • Run as the selected host UID/GID with a persistent writable home and caches. Development overlays preserve source edits, outputs and linked Git worktrees; optional CUDA compatibility libraries work consistently in the main process, docker exec and after container restarts.
  • Export images with their frozen configuration, standalone importer and checksums. Bare repository names select only :latest; digest and image-ID selections receive content-derived delivery tags that survive offline loading. Weights and datasets are transferred separately.
  • Add Docker build/CPU CI, real container regression tests, a task-oriented Docker guide, troubleshooting instructions and acceptance records.

Validation

  • Rebuilt the final implementation as openwam:digest-compat-fixes.
  • make docker-check: dependency, serve CLI and Ruff checks passed; 1,972 CPU tests passed, 12 skipped and 21 deselected.
  • make docker-integration-check PYTHON=python3: 11 tests passed, including digest export/load after shutting down the source registry, Compose creation from the delivered bundle, worktree Git operations, arbitrary runtime IDs and CUDA library selection across run, exec and restart.
  • Additional checks passed for the older bundled importer, disabled CUDA compatibility with a missing compatibility directory, actionlint and Bash syntax.
  • Remote validation for the pushed head: Docker build and tests.

Earlier H100 acceptance covers released-checkpoint inference and four-GPU training/recovery through steps 1–20. That GPU run predates the final runtime/export fixes; current-head GPU training, multi-node/RDMA and optional Cosmos GPU behavior have not been revalidated.

Provide a locked CUDA 12.8 image, runtime UID mapping, persistent caches and outputs, GPU smoke checks, and serving/training/development/worktree configurations. Preserve training signal delivery and configured inference endpoints.
Resolve Make image selection through the effective Compose configuration and export versioned bundles with image-bound configuration and integrity checks. Document complete online/offline workflows and cover image overrides, mounts, worktrees, runtime identities and bundle delivery.
Build and load the linux/amd64 image in GitHub Actions, validate Compose profiles, run container CPU checks and exercise Docker integration workflows. Include Docker tooling in the standard lint job.
Record the offline H100 inference and training/resume acceptance, subsequent runtime and Compose checks, and the validation limits for each tested image revision.
Docker inspect defaults an untagged repository to latest, while Docker save
archives every tag in that repository. Resolve the default tag before saving
and record the same explicit reference in the bundle manifest and environment.
Preserve explicit tags, digests and image ID inputs, including registry ports.

Extend the real offline round-trip test with two distinct images in one local
repository and inspect the saved tar to ensure only the selected tag is present.
Cover reference forms in the CLI tests and document the default tag behavior.

Validation: the new integration regression fails before the fix (2 images
instead of 1). The rebuilt image passes make docker-check and
make docker-integration-check: 1970 CPU tests and 9 Docker integration tests.
Bind digest and image-ID exports to a content-derived local tag, preserve the source reference, and refuse conflicting delivery tags. Verify a real digest pull, export, offline load, and Compose creation using a temporary loopback registry; cover stable tags and collisions in CLI tests.
Put a private per-container compatibility directory on the image's library
search path. The non-root bootstrap atomically selects the opt-in CUDA
libraries there, so the entrypoint, docker exec, and restarted processes use
the same loader configuration. Leave the directory inactive by default and
report missing compatibility libraries before starting the requested command.

Document recreation after changing the setting. The real regression checks
enabled and disabled modes, arbitrary UID/GID, exec, restart, and missing
libraries; it fails against the previous image at the exec comparison.

Validation: the rebuilt CUDA image passes make docker-check and
make docker-integration-check (1972 CPU tests and 11 integration tests),
including the separate digest bundle fix and offline Compose creation.
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