You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa59e15
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docker/README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,35 @@ docker build \
27
27
.
28
28
```
29
29
30
+
The image installs [Mixture of Kittens](https://github.com/QiZhangNV/mixture-of-kittens)
31
+
on both `linux/amd64` and `linux/arm64`. Each platform's native wheel includes
32
+
GB200/B200 (`sm_100a`) and GB300/B300 (`sm_103a`) kernels by default. This does not
33
+
enable MoK kernels on other GPUs or select MoK as a training backend.
34
+
35
+
The `mok-wheel` stage builds against the same base image's Python, PyTorch, and CUDA
36
+
as the final image, independently of the other Bridge dependencies. BuildKit caches
37
+
it by platform, base image, source revision, GPU targets, installer, and patch; registry
38
+
caches must export intermediate stages with `mode=max` (as Bridge CI already does).
39
+
The build checks that the wheel contains every requested GPU target without requiring
40
+
a GPU. The pinned source needs `scripts/prepare_thunderkittens.sh` and the compatibility
41
+
patch in `docker/patches/mok.patch`; revisit both workarounds when updating the source.
42
+
43
+
Build only the MoK wheel stage on either native builder, for example:
44
+
45
+
```bash
46
+
docker buildx build \
47
+
--platform linux/arm64 \
48
+
-f docker/Dockerfile.ci \
49
+
--target mok-wheel \
50
+
-t megatron-bridge-mok-wheel:arm64 \
51
+
--load \
52
+
.
53
+
```
54
+
55
+
Use `--platform linux/amd64` on an AMD64 builder. Full image builds use the existing
56
+
`megatron_bridge` target and install the wheel after dependency syncing. MoK is a
57
+
Docker-only dependency, outside `pyproject.toml` and `uv.lock`.
58
+
30
59
| Argument | Description |
31
60
|---|---|
32
61
|`BASE_IMAGE`| Base container |
@@ -204,6 +233,8 @@ docker build \
204
233
|`APPLY_PYTORCH_LIBRARY_FINALIZER_PATCH`| Set to `True` to apply the torch.library finalizer patch; `False` for base images it does not apply against (e.g. Rubin) |
205
234
|`INSTALL_DEEPEP`| Set to `True` to build and install DeepEP and nvshmem |
206
235
|`DEEPEP_COMMIT`| DeepEP git commit SHA |
236
+
|`MOK_COMMIT`| Full Mixture of Kittens source commit SHA; defaults to `a2ad2d0ce2366c1817d15498cdbaf8ead5966117`|
237
+
|`MOK_ARCH`| GPU targets in each CPU platform's MoK wheel: `ALL` (default, GB200 and GB300), `SM100` (GB200/B200), or `SM103` (GB300/B300) |
207
238
|`REINSTALL_NVSHMEM`| Set to `True` to reinstall nvshmem (`nvidia-nvshmem-cu13`) over the base image version; only applied when `INSTALL_DEEPEP=True`|
208
239
|`MCORE_TRIGGERED_TESTING`| Skip uv lockfile check for cross-version Megatron-LM testing |
209
240
|`INSTALL_DIFFUSION_DEPS`| Install the test-only WAN diffusion dependencies; defaults to `false` for Framework/release images |
@@ -230,9 +261,11 @@ docker build \
230
261
|`common/install_cublas.sh`| Reinstall cuBLAS and cuBLASLt from the public NVIDIA CUDA apt repo |
231
262
|`common/install_nccl.sh`| Reinstall NCCL from the public NVIDIA CUDA apt repo |
232
263
|`common/install_cudnn.sh`| Reinstall cuDNN from the public NVIDIA CUDA apt repo |
264
+
|`common/install_mok.sh`| Build and verify the pinned Mixture of Kittens wheel |
233
265
|`common/install_nsys.sh`| Reinstall Nsight Systems from the public NVIDIA CUDA apt repo |
234
266
|`common/install_mamba.sh`| Build the locked Mamba sdist with the local C++ standard patch |
235
267
|`common/preserve_base_runtime.py`| Record and check selected base package metadata for opt-in runtime preservation |
236
268
|`patches/deepep.patch`| Patch applied to DeepEP during CI image build |
269
+
|`patches/mok.patch`| MoK dual GPU target build support and PyTorch/CUDA namespace compatibility fix |
237
270
|`patches/mamba.patch`| Let Mamba's CUDA extension inherit PyTorch's C++ standard |
238
271
|`patches/vllm.patch`| Patch applied to vLLM after install in fw-base |
0 commit comments