Skip to content

Commit fccd9cc

Browse files
authored
Enable ARM64 support across all Docker build targets (#84)
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent 49c561b commit fccd9cc

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.github/actions/build-container/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ runs:
5959
SAFE_REF_NAME: ${{ inputs.safe_ref_name }}
6060
NVCR_CONTAINER_REPO: ${{ inputs.nvcr_container_repo }}
6161
NGC_ORG: ${{ inputs.container_org }}
62-
PLATFORMS: 'linux/amd64' # Only amd64 for faster PR validation
6362
DOCKER_BUILDKIT: 1
6463
BUILDX_CACHE_FROM: type=local,src=/tmp/.buildx-cache
6564
BUILDX_CACHE_TO: type=local,dest=/tmp/.buildx-cache-new,mode=max

.github/workflows/container-build-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ jobs:
136136
env:
137137
# Disable registry cache for pull requests to avoid permission issues
138138
DISABLE_REGISTRY_CACHE: ${{ (github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/pull-request/')) && 'true' || 'false' }}
139+
# Disable --load flag in CI builds (causes issues with multi-platform builds)
140+
DOCKER_LOAD_ARG: ''
139141
with:
140142
safe_ref_name: ${{ needs.prepare-environment.outputs.safe_ref_name }}
141143
nvcr_container_repo: ${{ needs.prepare-environment.outputs.nvcr_container_repo }}

common.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ BINARY_SOURCE ?= .
6464

6565
# Docker configuration (can be overridden per module)
6666
DOCKER_EXTRA_ARGS ?=
67+
DOCKER_LOAD_ARG ?= --load
6768
HAS_DOCKER ?= 1
6869

6970
# Module type configuration (Go=1, Python=0 - Python modules override targets)
@@ -182,7 +183,7 @@ docker-build: setup-buildx
182183
$(CACHE_FROM_ARG) \
183184
$(CACHE_TO_ARG) \
184185
$(DOCKER_EXTRA_ARGS) \
185-
--load \
186+
$(DOCKER_LOAD_ARG) \
186187
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-$(MODULE_NAME):$(SAFE_REF_NAME) \
187188
-f $(DOCKER_MODULE_PATH)/Dockerfile \
188189
.
@@ -191,10 +192,10 @@ docker-build: setup-buildx
191192
docker-build-local: setup-buildx
192193
@echo "Building Docker image for $(MODULE_NAME) (local, no remote cache)..."
193194
cd $(REPO_ROOT) && docker buildx build \
194-
--platform linux/amd64 \
195+
--platform $(PLATFORMS) \
195196
--network=host \
196197
$(DOCKER_EXTRA_ARGS) \
197-
--load \
198+
$(DOCKER_LOAD_ARG) \
198199
-t $(MODULE_NAME):local \
199200
-f $(DOCKER_MODULE_PATH)/Dockerfile \
200201
.

health-monitors/gpu-health-monitor/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ docker-build-dcgm3: setup-buildx
117117
$(CACHE_FROM_ARG_DCGM3) \
118118
$(CACHE_TO_ARG_DCGM3) \
119119
$(DOCKER_EXTRA_ARGS) \
120-
--load \
120+
$(DOCKER_LOAD_ARG) \
121121
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-$(MODULE_NAME):$(SAFE_REF_NAME)-dcgm-3.x \
122122
--build-arg DCGM_VERSION=3.3.7-1-ubuntu22.04 \
123123
--build-arg PYTHONPATH=/usr/local/dcgm/bindings/python3 \
@@ -133,7 +133,7 @@ docker-build-dcgm4: setup-buildx
133133
$(CACHE_FROM_ARG_DCGM4) \
134134
$(CACHE_TO_ARG_DCGM4) \
135135
$(DOCKER_EXTRA_ARGS) \
136-
--load \
136+
$(DOCKER_LOAD_ARG) \
137137
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-$(MODULE_NAME):$(SAFE_REF_NAME)-dcgm-4.x \
138138
-f $(DOCKER_MODULE_PATH)/Dockerfile \
139139
.

node-drainer-module/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ docker-build-with-cache: setup-buildx
5656
$(CACHE_FROM_ARG) \
5757
$(CACHE_TO_ARG) \
5858
$(DOCKER_EXTRA_ARGS) \
59-
--load \
59+
$(DOCKER_LOAD_ARG) \
6060
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-$(MODULE_NAME):$(SAFE_REF_NAME) \
6161
-f $(MODULE_NAME)/Dockerfile \
6262
.

nvsentinel-log-collector/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SAFE_REF_NAME ?= $(shell echo $(CI_COMMIT_REF_NAME) | sed 's/\//-/g')
99
SAFE_REF_NAME := $(if $(SAFE_REF_NAME),$(SAFE_REF_NAME),local)
1010
BUILDX_BUILDER ?= nvsentinel-builder
1111
PLATFORMS ?= linux/arm64,linux/amd64
12+
DOCKER_LOAD_ARG ?= --load
1213

1314
# Cache configuration (can be disabled via environment variables)
1415
DISABLE_REGISTRY_CACHE ?= false
@@ -90,6 +91,7 @@ docker-build-log-collector: setup-buildx
9091
--network=host \
9192
$(CACHE_FROM_ARG_LOG) \
9293
$(CACHE_TO_ARG_LOG) \
94+
$(DOCKER_LOAD_ARG) \
9395
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-log-collector:$(SAFE_REF_NAME) \
9496
.
9597

@@ -103,6 +105,7 @@ docker-build-file-server-cleanup: setup-buildx
103105
--network=host \
104106
$(CACHE_FROM_ARG_CLEANUP) \
105107
$(CACHE_TO_ARG_CLEANUP) \
108+
$(DOCKER_LOAD_ARG) \
106109
-f Dockerfile.cleanup \
107110
-t $(NVCR_CONTAINER_REPO)/$(NGC_ORG)/nvsentinel-file-server-cleanup:$(SAFE_REF_NAME) \
108111
.

0 commit comments

Comments
 (0)