Skip to content

Commit ec526bd

Browse files
maryamtahhanclaude
andcommitted
feat(mcv): Add unified container with NVIDIA and AMD support
Add mcv:unified container variant that includes both NVIDIA (CUDA/NVML) and AMD (ROCm) GPU support. The container automatically detects the GPU vendor at runtime, simplifying deployment across mixed GPU clusters. Key changes: - New mcv-unified target in amd64.dockerfile (CUDA 12.6.3 + ROCm 6.2.4) - Updated Makefile: 'make image-unified' builds unified image - Unified image tagged as both :unified and :latest (~1.2 GB) - Comprehensive documentation with Kubernetes examples - Auto-detection via MCV client library (dlopen for NVML, CLI for ROCm) Runtime behavior: - NVIDIA nodes: Uses NVML (libnvidia-ml.so.1) for GPU detection - AMD nodes: Uses rocm-smi for GPU detection - CPU nodes: Gracefully falls back to no-GPU mode Container variants now available: - mcv:unified (NEW DEFAULT) - NVIDIA + AMD support (~1.2 GB) - mcv:minimal - No GPU libs (~176 MB) - mcv:nvidia - NVIDIA only (~356 MB) - mcv:amd - AMD only (~923 MB) This change is backward-compatible. Existing mcv:nvidia and mcv:amd deployments continue to work unchanged. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
1 parent 947823f commit ec526bd

4 files changed

Lines changed: 523 additions & 8 deletions

File tree

mcv/Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ IMAGE_NAME ?= mcv
139139
CONTAINER_RUNTIME = $(shell command -v docker 2>/dev/null || command -v podman 2>/dev/null)
140140

141141
.PHONY: image-minimal
142-
image-minimal: ## Build minimal container image (no GPU libraries, ~176MB) - DEFAULT
142+
image-minimal: ## Build minimal container image (no GPU libraries, ~176MB)
143143
@if [ -z "$(CONTAINER_RUNTIME)" ]; then \
144144
echo "Error: No container runtime found. Please install docker or podman"; \
145145
exit 1; \
@@ -148,7 +148,6 @@ image-minimal: ## Build minimal container image (no GPU libraries, ~176MB) - DEF
148148
$(CONTAINER_RUNTIME) build --platform linux/amd64 \
149149
--target mcv-minimal \
150150
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME):minimal \
151-
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest \
152151
-f images/amd64.dockerfile \
153152
..
154153

@@ -178,8 +177,22 @@ image-nvidia: ## Build NVIDIA container image (with CUDA+NVML, ~356MB)
178177
-f images/amd64.dockerfile \
179178
..
180179

180+
.PHONY: image-unified
181+
image-unified: ## Build unified container image (with NVIDIA+AMD, ~1.2GB) - NEW DEFAULT
182+
@if [ -z "$(CONTAINER_RUNTIME)" ]; then \
183+
echo "Error: No container runtime found. Please install docker or podman"; \
184+
exit 1; \
185+
fi
186+
@echo "Building unified MCV image (NVIDIA+AMD) using $(CONTAINER_RUNTIME)..."
187+
$(CONTAINER_RUNTIME) build --platform linux/amd64 \
188+
--target mcv-unified \
189+
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME):unified \
190+
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest \
191+
-f images/amd64.dockerfile \
192+
..
193+
181194
.PHONY: images
182-
images: image-minimal image-amd image-nvidia ## Build all container image variants
195+
images: image-unified image-minimal image-nvidia image-amd ## Build all container image variants (unified is default)
183196

184197
.PHONY: image-push
185198
image-push: ## Push all container images to registry

0 commit comments

Comments
 (0)