Some checks failed
CI / Benchmarks (yolo26n, macos-26, 3.13) (push) Has been cancelled
CI / Benchmarks (yolo26n, ubuntu-24.04-arm, 3.13) (push) Has been cancelled
CI / Benchmarks (yolo26n, ubuntu-latest, 3.13) (push) Has been cancelled
CI / Tests (macos-26, 3.13, latest) (push) Has been cancelled
CI / Tests (ubuntu-24.04-arm, 3.13, latest) (push) Has been cancelled
CI / Tests (ubuntu-latest, 3.13, latest) (push) Has been cancelled
CI / Tests (ubuntu-latest, 3.8, 1.8.0, 0.9.0) (push) Has been cancelled
CI / Tests (windows-latest, 3.13, latest) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.10, 1.11.0, 0.12.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.10, 1.12.0, 0.13.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.10, 1.13.0, 0.14.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.11, 2.0.0, 0.15.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.11, 2.1.0, 0.16.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.12, 2.2.0, 0.17.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.9, 1.10.0, 0.11.0) (push) Has been cancelled
CI / SlowTests (export-legacy-torch, ubuntu-latest, 3.9, 1.9.0, 0.10.0) (push) Has been cancelled
CI / SlowTests (macos-26, 3.13, latest) (push) Has been cancelled
CI / SlowTests (ubuntu-24.04-arm, 3.13, latest) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.10.0, 0.25.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.3.0, 0.18.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.4.0, 0.19.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.5.0, 0.20.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.6.0, 0.21.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.7.0, 0.22.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.8.0, 0.23.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.12, 2.9.0, 0.24.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.13, 2.11.0, 0.26.0) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.13, latest) (push) Has been cancelled
CI / SlowTests (ubuntu-latest, 3.8, 1.8.0, 0.9.0) (push) Has been cancelled
CI / SlowTests (windows-latest, 3.13, latest) (push) Has been cancelled
CI / IsolatedExports (push) Has been cancelled
CI / GPU (push) Has been cancelled
CI / RaspberryPi (push) Has been cancelled
CI / NVIDIA_Jetson (JetPack5.1.2, 1.23.5, https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.16.3-cp38-cp38-linux_aarch64.whl, 3.8, jetson-jp512, https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.2.0-cp38-c… (push) Has been cancelled
CI / NVIDIA_Jetson (JetPack6.2, 1.26.4, https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl, 3.10, jetson-jp62, https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.5.0a0+872d… (push) Has been cancelled
CI / Conda (ubuntu-latest, 3.12) (push) Has been cancelled
Publish Docker Images / Build (, Dockerfile-arm64, linux/arm64, ubuntu-24.04-arm, latest-arm64) (push) Has been cancelled
Publish Docker Images / Build (, Dockerfile-jetson-jetpack4, linux/arm64, ubuntu-24.04-arm, latest-jetson-jetpack4) (push) Has been cancelled
Publish Docker Images / Build (, Dockerfile-jetson-jetpack5, linux/arm64, ubuntu-24.04-arm, latest-jetson-jetpack5) (push) Has been cancelled
Publish Docker Images / Build (, Dockerfile-jetson-jetpack6, linux/arm64, ubuntu-24.04-arm, latest-jetson-jetpack6) (push) Has been cancelled
Publish Docker Images / Build (, Dockerfile-nvidia-arm64, linux/arm64, ubuntu-24.04-arm, latest-nvidia-arm64) (push) Has been cancelled
Publish Docker Images / Build (Dockerfile-jupyter,Dockerfile-cpu,Dockerfile-runner-cpu,Dockerfile-python-export, Dockerfile-python, linux/amd64, ubuntu-latest, latest-python) (push) Has been cancelled
Publish Docker Images / Build (Dockerfile-runner,Dockerfile-export, Dockerfile, linux/amd64, ubuntu-latest, latest) (push) Has been cancelled
Publish Docs / Docs (push) Has been cancelled
Publish to PyPI / check (push) Has been cancelled
CI / Summary (push) Has been cancelled
Publish Docker Images / trigger-actions (push) Has been cancelled
Publish Docker Images / notify (push) Has been cancelled
Publish to PyPI / build (push) Has been cancelled
Publish to PyPI / publish (push) Has been cancelled
Publish to PyPI / sbom (push) Has been cancelled
Publish to PyPI / notify (push) Has been cancelled
## InfiniBand / RDMA support (Dockerfile + entrypoint)
- Base image switched to registry.d-robotics.cc/.../yolo_distributed:v20260611_fix
- Install IB user-space libs: libibverbs1, librdmacm1, ibverbs-providers,
rdma-core, infiniband-diags, perftest
- Set NCCL IB env vars at build time (NCCL_IB_DISABLE=0, NCCL_IB_GID_INDEX=3,
NCCL_IB_HCA=mlx5, NCCL_IB_TC=106, NCCL_IB_SL=5, NCCL_NET_GDR_LEVEL=2)
- entrypoint.sh: print IB device info (ibv_devices) on startup for diagnostics
## Multi-node DDP bug fixes (ultralytics/engine/trainer.py)
Three bugs that only surface with NNODES > 1:
1. Wrong device index in _setup_ddp():
- Before: torch.cuda.set_device(RANK) and torch.device("cuda", RANK)
- After: torch.cuda.set_device(LOCAL_RANK) and torch.device("cuda", LOCAL_RANK)
- RANK is the global rank (0-15 across 2 nodes); LOCAL_RANK is the per-node
GPU index (0-7). Using global RANK as a CUDA device index fails on node 1
where RANK 8-15 don't correspond to real GPU indices.
2. Wrong device_ids in DistributedDataParallel constructor:
- Before: device_ids=[RANK]
- After: device_ids=[LOCAL_RANK], find_unused_parameters=False,
gradient_as_bucket_view=True
- Same RANK vs LOCAL_RANK confusion; also adds gradient_as_bucket_view for
lower memory overhead and disables find_unused_parameters (no unused params
in this model, the flag was causing a spurious warning).
3. Pod hangs after training completes (final_eval deadlock):
- Root cause: final_eval() called self.validator(model=best.pt) on ALL ranks
without a RANK guard. The standalone validator path uses
torch.device("cuda", RANK) — valid for ranks 0-7 on the master node but
invalid for ranks 8-15 on the worker node, causing immediate crash. Those
crashed ranks never reached the torch_distributed_zero_first barrier inside
the validator, so rank 0 waited at that barrier forever → pod hung for 20+
minutes until manual deletion.
- Fix: call dist.destroy_process_group() on all ranks before the validator,
then guard the validator call with if RANK in {-1, 0}. This lets worker
ranks exit cleanly and runs final validation only on rank 0 (which already
has the full best.pt checkpoint).
## DetectionValidator dist guard (docker/distributed/detect_val.py)
- After destroy_process_group(), dist.get_world_size() raises ValueError because
no default process group exists. DetectionValidator.gather_stats() and
_gather_image_metrics() call dist.get_world_size() unconditionally.
- Fix: add `if not dist.is_initialized(): return` at the top of both methods.
When rank 0 runs the standalone validator after destroying the group, the
stats are already fully accumulated from rank 0's inference on all images —
there is nothing to gather.
## Build script (build_docker.sh)
- Added REPO_ROOT so the build context is the repo root (needed because COPY
paths like ultralytics/engine/trainer.py are relative to repo root)
- Added DOCKER_PLATFORM variable (default linux/amd64) for cross-platform builds
- Default tag suffix changed from _fix to _ib
## VCJob manifests
- vcjob-ib.yaml: reference manifest with IB env vars, H20-3e nodeSelector,
PVC dataset mount, rdma/hca resource, batch=128
- vcjob-ib3.yaml: same manifest pointing to v20260611_ib3 (fully fixed image)
Tested on 2-node × 8-GPU H20-3e cluster. Both master and worker pods exit
with status Completed after 100 epochs; final validation metrics are printed
and results saved to /workspace/runs/detect/train/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
FROM registry.d-robotics.cc/fat-auwomo-fat-auwomo/yolo_distributed:v20260611_fix
|
|
|
|
ARG http_proxy
|
|
ARG https_proxy
|
|
ARG no_proxy
|
|
|
|
# Install InfiniBand / RDMA user-space libraries for NCCL IB transport
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libibverbs1 \
|
|
librdmacm1 \
|
|
ibverbs-providers \
|
|
rdma-core \
|
|
infiniband-diags \
|
|
perftest \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
MKL_THREADING_LAYER=GNU \
|
|
YOLO_OFFLINE=true
|
|
|
|
# NCCL InfiniBand settings — overridable at runtime via env vars
|
|
ENV NCCL_IB_DISABLE=0 \
|
|
NCCL_IB_GID_INDEX=3 \
|
|
NCCL_IB_HCA=mlx5 \
|
|
NCCL_IB_TC=106 \
|
|
NCCL_IB_SL=5 \
|
|
NCCL_NET_GDR_LEVEL=2 \
|
|
NCCL_SOCKET_IFNAME=eth0
|
|
|
|
COPY ultralytics/engine/trainer.py /opt/oellm-venv/lib/python3.10/site-packages/ultralytics/engine/trainer.py
|
|
COPY docker/distributed/detect_val.py /opt/oellm-venv/lib/python3.10/site-packages/ultralytics/models/yolo/detect/val.py
|
|
COPY docker/distributed/entrypoint.sh /entrypoint.sh
|
|
COPY docker/distributed/yolo26.yaml /workspace/models/yolo26.yaml
|
|
COPY docker/distributed/train_ddp.py /workspace/train_ddp.py
|
|
|
|
ENTRYPOINT []
|
|
CMD ["bash"]
|
|
|
|
WORKDIR /workspace
|