From 971bff62f70e4d57c2b570dc78b082e73ae8f2ab Mon Sep 17 00:00:00 2001 From: George Stykalin Date: Wed, 15 Apr 2026 12:41:44 +0300 Subject: [PATCH] Revert to ethernet - IB not accessible in containers IB attempts are failing because /proc/drivers/infiniband is not mounted in the container (container runtime security restriction). Even though RDMA devices are exposed, NCCL needs /proc/drivers/infiniband for proper IB initialization. This requires container image changes. Co-Authored-By: Claude --- dags/test-train-pytorch.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dags/test-train-pytorch.py b/dags/test-train-pytorch.py index 501508b..ade6574 100644 --- a/dags/test-train-pytorch.py +++ b/dags/test-train-pytorch.py @@ -115,20 +115,17 @@ def run_training_node_func(rank, world_size): os.environ['WORLD_SIZE'] = str(world_size) os.environ['RANK'] = str(rank) - # NCCL Configuration - Try IB with RDMA devices + # NCCL Configuration - Use ethernet (IB not accessible in containers) os.environ['NCCL_DEBUG'] = 'INFO' os.environ['NCCL_TIMEOUT'] = str(NCCL_TIMEOUT) os.environ['NCCL_BLOCKING_WAIT'] = '1' - os.environ['NCCL_IB_DISABLE'] = '0' # Enable IB - # Don't set SOCKET_IFNAME - let NCCL auto-detect + os.environ['NCCL_SOCKET_IFNAME'] = 'eth0' # Use ethernet (reliable) + os.environ['NCCL_IB_DISABLE'] = '1' # Disable IB - /proc/drivers/infiniband not accessible os.environ['NCCL_P2P_DISABLE'] = '0' # Enable P2P os.environ['NCCL_IGNORE_CPU_AFFINITY'] = '1' # Better compatibility os.environ['NCCL_LL_THRESHOLD'] = '0' # Disable LL for compatibility os.environ['NCCL_ALGO'] = 'Ring' # Use ring algorithm os.environ['NCCL_PROTO'] = 'Simple' # Use simple protocol - # These help with IB in containers where /proc/drivers/infiniband isn't available - os.environ['NCCL_IB_HCA'] = '^irdma[0-9]+$|^mlx5_[0-9]+$|^hfi1_[0-9]+$|^qib0$' # Match any IB HCA - os.environ['NCCL_SOCKET_NTHREADS'] = '4' # More threads for better performance print(f"[{rank}] Environment configured:") print(f" MASTER_ADDR: {MASTER_ADDR}")