NIXL, NCCL, and UCX tests container image built from https://github.com/dmvevents/dynamo-workshop
1.7K
Production-ready containers for high-performance distributed ML workloads on AWS with EFA support, optimized for H100, A100, and A10G GPU instances.
This container suite provides optimized Docker images for AWS GPU instances featuring:
For H100 instances with 16+ CPU cores:
# Production-optimized slim builds (~17GB each)
./build-all-slim.sh
# Standard runtime builds (~25GB each)
./build-all-runtime.sh
This builds all three containers:
Build Time: ~60-90 minutes on H100 with 16 cores
# H100 (default)
./build.sh
# A100
CUDA_ARCH=80 CUDA_ARCH_NAME=A100 ./build.sh
# A10G
CUDA_ARCH=86 CUDA_ARCH_NAME=A10G ./build.sh
# H100 slim (recommended for production)
BUILD_TARGET=slim CUDA_ARCH=90 ./build_vllm.sh
# A100 runtime
CUDA_ARCH=80 CUDA_ARCH_NAME=A100 ./build_vllm.sh
# A10G slim
BUILD_TARGET=slim CUDA_ARCH=86 CUDA_ARCH_NAME=A10G ./build_vllm.sh
# H100 slim (recommended for production)
BUILD_TARGET=slim CUDA_ARCH=90 ./build_trtllm.sh
# A100 runtime
CUDA_ARCH=80 CUDA_ARCH_NAME=A100 ./build_trtllm.sh
# A10G slim
BUILD_TARGET=slim CUDA_ARCH=86 CUDA_ARCH_NAME=A10G ./build_trtllm.sh
| GPU | CUDA Arch | Build Flag | AWS Instance | Default |
|---|---|---|---|---|
| H100 | 90 (SM90) | CUDA_ARCH=90 CUDA_ARCH_NAME=H100 | p5.* | ✅ Yes |
| A100 | 80 (SM80) | CUDA_ARCH=80 CUDA_ARCH_NAME=A100 | p4d.* | |
| A10G | 86 (SM86) | CUDA_ARCH=86 CUDA_ARCH_NAME=A10G | g5.* |
| Target | Size | Use Case | Build Flag |
|---|---|---|---|
| slim | ~17GB | Production deployments | BUILD_TARGET=slim |
| runtime | ~25GB | Development, debugging | BUILD_TARGET=runtime (default) |
| dev | ~27GB | Active development | BUILD_TARGET=dev |
Slim builds remove (safely):
Slim builds keep:
See DEBLOAT_GUIDE.md for detailed optimization information.
Pip Install (Default - Fast):
./build_vllm.sh # 10-15 minutes
Source Build (Optional - Slow):
USE_SOURCE_BUILD=true MAX_JOBS=8 ./build_vllm.sh # 60-90 minutes
CUDA_ARCH=90 # GPU architecture (90=H100, 80=A100, 86=A10G)
CUDA_ARCH_NAME=H100 # GPU name for environment variables
INSTALL_NCCL=1 # Install NCCL (1=yes, 0=no)
INSTALL_NVSHMEM=0 # Install NVSHMEM (1=yes, 0=no)
NPROC=12 # Parallel build jobs (12 recommended for 16-core)
TAG=production # Docker tag
CUDA_ARCH=90 # GPU architecture
CUDA_ARCH_NAME=H100 # GPU name
BUILD_TARGET=runtime # Container target (runtime/slim/dev)
USE_SOURCE_BUILD=false # Set to "true" to build vLLM from source
MAX_JOBS=12 # Parallel jobs (for source builds only)
TAG=dynamo-vllm:latest # Docker tag
CUDA_ARCH=90 # GPU architecture
CUDA_ARCH_NAME=H100 # GPU name
BUILD_TARGET=runtime # Container target (runtime/slim/dev)
TAG=dynamo-trtllm:latest # Docker tag
| Setting | Recommended Value | Notes |
|---|---|---|
| NPROC | 12 | For base container builds |
| MAX_JOBS | 12 | For vLLM source builds |
| CUDA_ARCH | 90 | H100 SM architecture |
Why 12 instead of 16?
# Run vLLM container
docker run -it --rm --gpus all dynamo-vllm:slim
# Run TensorRT-LLM container
docker run -it --rm --gpus all dynamo-trtllm:slim
# Start vLLM server
docker run -it --gpus all -p 8000:8000 dynamo-vllm:slim \
vllm serve meta-llama/Llama-2-7b-hf \
--host 0.0.0.0 --port 8000
# Test the server
curl http://localhost:8000/v1/completions \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-2-7b-hf",
"prompt": "San Francisco is",
"max_tokens": 50
}'
For EFA-enabled AWS instances (p5.*, p4d.*):
# Full EFA setup with networking
docker run --gpus all --net=host --privileged \
-v /dev/infiniband:/dev/infiniband \
-it dynamo-vllm:slim
# With ETCD coordination
docker run -it --rm --gpus all \
-e NIXL_ETCD_ENDPOINTS=http://etcd-service:2379 \
dynamo-vllm:slim
# Tag for ECR
docker tag dynamo-vllm:slim <account-id>.dkr.ecr.<region>.amazonaws.com/dynamo-vllm:slim
# Login to ECR
aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <account-id>.dkr.ecr.<region>.amazonaws.com
# Push
docker push <account-id>.dkr.ecr.<region>.amazonaws.com/dynamo-vllm:slim
apiVersion: v1
kind: Pod
metadata:
name: vllm-server
spec:
containers:
- name: vllm
image: <account-id>.dkr.ecr.<region>.amazonaws.com/dynamo-vllm:slim
resources:
limits:
nvidia.com/gpu: 1
command: ["vllm", "serve", "meta-llama/Llama-2-7b-hf", "--host", "0.0.0.0"]
These containers are optimized for AWS HyperPod clusters with EFA support. The NIXL networking stack integrates with HyperPod's cluster networking automatically.
For EFA-enabled instances:
-v /dev/infiniband:/dev/infiniband--net=host--privileged| Component | Version | Purpose |
|---|---|---|
| Base Image | NVIDIA CUDA DL Base 25.01 | CUDA 12.8, Ubuntu 24.04 |
| CUDA | 12.8 | GPU compute platform |
| NCCL | v2.27.5-1 | Collective communications |
| UCX | 1.19.0 | Unified communications with EFA |
| libfabric | 2.3.0 | Fabric library with EFA provider |
| GDRCopy | v2.4.4 | GPU-direct RDMA |
| Component | Version | Purpose |
|---|---|---|
| EFA Installer | 1.42.0 | AWS EFA support |
| AWS OFI NCCL Plugin | v1.16.0 | EFA integration for NCCL |
| NVSHMEM | 3.2.5-1 | NVIDIA symmetric memory (optional) |
| PMIx | 4.2.6 | Process management |
| Component | Version | Purpose |
|---|---|---|
| NIXL | 0.4.1 | Network infrastructure library |
| nixlbench | Latest | Benchmarking tools |
| ETCD | v3.5.1 | Distributed coordination |
| AWS SDK C++ | 1.11.581 | AWS service integration |
| Component | Container | Installation |
|---|---|---|
| vLLM | dynamo-vllm | Pip install (default) or source build |
| TensorRT-LLM | dynamo-trtllm | Pip install (v0.17.0) |
| PyTorch | All | CUDA 12.8 variant |
CUDAARCHS=90 # Set by build (90/80/86)
CUDA_ARCH_NAME=H100 # Set by build (H100/A100/A10G)
CMAKE_CUDA_ARCHITECTURES=90 # For CMake builds
TORCH_CUDA_ARCH_LIST=9.0+PTX # For PyTorch (9.0/8.0/8.6)
CUDA_HOME=/usr/local/cuda
NIXL_PREFIX=/usr/local/nixl
NIXL_PLUGIN_DIR=/usr/local/nixl/lib/x86_64-linux-gnu/plugins
NIXL_ETCD_NAMESPACE=/nixl/agents
NIXL_ETCD_ENDPOINTS=http://etcd-service:2379 # Optional
FI_PROVIDER=efa
NCCL_DEBUG=INFO
NCCL_SOCKET_IFNAME=^docker,lo,veth
NVSHMEM_REMOTE_TRANSPORT=libfabric
NVSHMEM_LIBFABRIC_PROVIDER=efa
# Environment information
env-info
# EFA connectivity tests (requires EFA hardware)
efa-test
# NIXL performance benchmarks
nixlbench-test
# Container debloating (for custom optimization)
debloat-container.sh
# Test vLLM installation
python3 -c "import vllm; print(vllm.__version__)"
# Test EFA detection
fi_info -p efa
# Test NCCL with EFA
all_reduce_perf -b 8 -e 128M -f 2 -g 1
# Test NIXL Python bindings
python3 -c "import nixl; print(dir(nixl))"
| Container | Slim Build | Runtime Build |
|---|---|---|
| Base | ~30 min, 24GB | ~30 min, 24GB |
| vLLM | ~12 min, 17GB | ~12 min, 25GB |
| TensorRT-LLM | ~18 min, 17GB | ~18 min, 25GB |
| Total | ~60 min | ~60 min |
| Container | Build Time | Notes |
|---|---|---|
| vLLM (source) | +60-90 min | Adds significant time, requires 64GB+ RAM |
| Build Type | Recommended RAM |
|---|---|
| Slim builds | 64GB+ |
| Runtime builds | 64GB+ |
| Source builds | 128GB+ |
# Check EFA hardware
fi_info -p efa
# Verify EFA driver
cat /sys/class/infiniband/*/device/vendor
# Check device mounting
ls -la /dev/infiniband/
# Ensure container has EFA access
docker run --rm --privileged -v /dev/infiniband:/dev/infiniband \
dynamo-vllm:slim fi_info -p efa
# Run NCCL tests
all_reduce_perf -b 8 -e 128M -f 2 -g 1
# Enable debug output
export NCCL_DEBUG=INFO
# Check EFA plugin
ls -la /usr/local/lib/libnccl-net.so
Out of Memory:
# Reduce parallel jobs
MAX_JOBS=8 ./build_vllm.sh
# Or for base builds
NPROC=8 ./build.sh
Container Too Large:
# Use slim target
BUILD_TARGET=slim ./build_vllm.sh # Saves 8GB
Slow vLLM Build:
# Ensure using pip install (default)
./build_vllm.sh # Should be fast (10-15 min)
# If accidentally using source build:
USE_SOURCE_BUILD=false ./build_vllm.sh
# Check GPU
nvidia-smi
# Test Docker GPU support
docker run --rm --gpus all nvidia/cuda:12.8-runtime-ubuntu24.04 nvidia-smi
# Ensure NVIDIA Container Toolkit is installed
dpkg -l | grep nvidia-container-toolkit
# Direct docker build for A100 slim vLLM
docker build \
--build-arg CUDA_ARCH=80 \
--build-arg CUDA_ARCH_NAME=A100 \
--target slim \
-f Dockerfile.dynamo-vllm \
-t dynamo-vllm:a100-slim \
.
# Build with custom tag
BUILD_TARGET=slim TAG=vllm:prod-v1 ./build_vllm.sh
# Build all architectures
for arch in "80:A100" "86:A10G" "90:H100"; do
IFS=':' read -r cuda_arch name <<< "$arch"
BUILD_TARGET=slim \
CUDA_ARCH=$cuda_arch \
CUDA_ARCH_NAME=$name \
TAG=dynamo-vllm:$name-slim \
./build_vllm.sh
done
Expected Sizes:
Build Requirements:
Runtime Requirements:
dynamo-workshop/
├── Dockerfile.production # Base NIXL+EFA container
├── Dockerfile.dynamo-vllm # vLLM container
├── Dockerfile.dynamo-trtllm # TensorRT-LLM container
├── build.sh # Build production base
├── build_vllm.sh # Build vLLM container
├── build_trtllm.sh # Build TensorRT-LLM container
├── build-all-slim.sh # Build all (optimized)
├── build-all-runtime.sh # Build all (standard)
├── README.md # This file
├── DEBLOAT_GUIDE.md # Size optimization guide
├── LICENSE # Apache 2.0
├── ATTRIBUTION.md # Credits
├── nvidia_entrypoint.sh # Container entrypoint
├── benchmarks/ # Performance benchmarks
├── container/ # Container dependencies
│ ├── deps/ # Python requirements
│ └── nvidia_entrypoint.sh # Entrypoint script
├── pkg-config-files/ # Build dependencies
│ ├── efa.pc # EFA pkg-config
│ └── gdrcopy.pc # GDRCopy pkg-config
└── scripts/ # Utility scripts
├── debloat-container.sh # Size optimization
├── efa-test.sh # EFA testing
├── env-info.sh # Environment info
└── nixlbench-test.sh # Benchmarking
Built for Amazon Web Services by:
Apache License 2.0 - See LICENSE for details.
See ATTRIBUTION.md for acknowledgments of open-source components.
For issues, questions, or contributions:
Built for AWS | Optimized for H100/A100/A10G | Production-Ready
Content type
Image
Digest
sha256:6eb521f99…
Size
7.6 GB
Last updated
12 months ago
docker pull iankoulski/nixl-tests