Skip to content

feat(docker): add runtime image profiles and ROCm compose support - #155

Merged
wlgys8 merged 1 commit into
Motphys:mainfrom
mxj711:feat/docker-runtime-profiles
Nov 4, 2026
Merged

wlgys8 merged 1 commit into
Motphys:mainfrom
mxj711:feat/docker-runtime-profiles

Conversation

@mxj711

@mxj711 mxj711 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

feat(docker): add runtime image profiles and ROCm compose support

Summary

  • Reorganized the Docker setup into runtime-specific image targets:
    • train-cuda
    • train-cuda-jax
    • train-rocm
    • deploy
    • unitree
  • Kept train-cuda as the default Docker build target.
  • Added a Docker publish workflow matrix for CUDA, CUDA+JAX, ROCm, and deployment images.
  • Added separate Docker Compose files:
    • docker/docker-compose.yml for NVIDIA CUDA training
    • docker/docker-compose.rocm.yml for AMD ROCm training
  • Added bilingual documentation for CUDA, ROCm, deployment, Unitree SDK handling, and Git LFS requirements.
  • Removed the -dev image target from the public Docker setup.

Closes #154

Changes

Docker image profiles

Target Image suffix Purpose
train-cuda -cuda Default CUDA training stack with SKRL Torch, RSLRL, FastSAC, MotrixSim, and TensorBoard
train-cuda-jax -cuda-jax CUDA training stack with the additional SKRL JAX runtime
train-rocm -rocm ROCm PyTorch training stack
deploy -deploy ONNX deployment runtime with MotrixSim and MuJoCo backends
unitree -unitree Unitree SDK2/DDS deployment runtime

The CUDA and ROCm images remain separate because their locked PyTorch profiles are mutually exclusive.

The default CUDA image also receives:

  • <version>-cuda
  • <major.minor>-cuda
  • <version>
  • <major.minor>
  • latest

Docker Compose

The CUDA Compose file uses an NVIDIA GPU reservation.

The ROCm Compose file uses AMD device passthrough:

devices:
  - ${MOTRIX_ROCM_COMPUTE_DEVICE:-/dev/kfd}
  - ${MOTRIX_ROCM_RENDER_DEVICE:-/dev/dri}
group_add:
  - video
  - render
security_opt:
  - seccomp=unconfined
shm_size: 1g

A specific AMD render node can be selected with:

MOTRIX_ROCM_RENDER_DEVICE=/dev/dri/renderD128

Dockerfile behavior

  • Uses Python 3.10.
  • Runs containers as a non-root motrix user.
  • Installs the application under /app.
  • Uses /workspace for user workloads and run output.
  • Pre-creates /workspace/runs with the correct ownership.
  • Installs locked third-party dependencies before copying workspace source.
  • Excludes local caches, virtual environments, tests, build output, and run output from runtime images.
  • Allows Unitree SDK2 native libraries to be injected through UNITREE_SDK_IMAGE.
  • Does not provide or publish a -dev image.

Validation

Passed:

uv lock --check

docker compose -f docker/docker-compose.yml config
docker compose -f docker/docker-compose.rocm.yml config

dprint check \
  .dockerignore \
  docker/Dockerfile \
  docker/docker-compose.yml \
  docker/docker-compose.rocm.yml \
  docker/README.md \
  .github/workflows/docker-build.yml \
  .github/workflows/README.md \
  docs/source/zh_CN/user_guide/getting_started/container_deployment.md \
  docs/source/en/user_guide/getting_started/container_deployment.md

git diff --check

Also validated:

  • The Docker workflow matrix contains only train-cuda, train-cuda-jax, train-rocm, and deploy.
  • The Dockerfile does not contain a dev target.
  • The default final stage is based on train-cuda.
  • ROCm Compose correctly resolves /dev/kfd, /dev/dri, group access, seccomp settings, and shared memory.
  • Dependency resolution was dry-run for the CUDA, CUDA+JAX, ROCm, deployment, Unitree, and full-workspace profiles.

@mxj711
mxj711 force-pushed the feat/docker-runtime-profiles branch 2 times, most recently from 8add2b7 to af42218 Compare November 3, 2026 08:52
@wlgys8
wlgys8 requested a balanced review from Copilot November 3, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@mxj711
mxj711 force-pushed the feat/docker-runtime-profiles branch from af42218 to 2d29833 Compare November 4, 2026 06:24
@wlgys8
wlgys8 merged commit a71bf58 into Motphys:main Nov 4, 2026
12 checks passed
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.

Add runtime-profile Docker images and CUDA/ROCm Compose support

3 participants