Skip to content

Commit

Permalink
Merge pull request #41 from cdesiniotis/fix-pkg-makefile
Browse files Browse the repository at this point in the history
Fix make targets which generate mig-parted packages
  • Loading branch information
elezar authored Apr 18, 2024
2 parents fd0b0ac + 20fd208 commit 99631f4
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions deployments/systemd/packages/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ REGISTRY ?= nvcr.io/nvidia
IMAGE := $(REGISTRY)/$(NAME)
endif

# strip 'v' from version string
PACKAGE_VERSION := $(VERSION:v%=%)

##### Public rules #####

VALID_TARGETS = tarball ubuntu18.04 ubuntu20.04 ubi8
VALID_TARGETS = tarball ubuntu20.04 ubi8

all: $(VALID_TARGETS)
.PHONY: all $(VALID_TARGETS)

tarball:
$(DOCKER) build --pull \
--build-arg PACKAGE_NAME=$(NAME) \
--build-arg PACKAGE_VERSION=$(VERSION) \
--build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) \
--build-arg PACKAGE_REVISION=$(REVISION) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--tag $(IMAGE):$(vVERSION)-tarball \
Expand All @@ -45,24 +48,10 @@ tarball:
-v $$(pwd)/dist/$(@):/dist \
$(IMAGE):$(vVERSION)-$(@)

ubuntu18.04:
$(DOCKER) build --pull \
--build-arg PACKAGE_NAME=$(NAME) \
--build-arg PACKAGE_VERSION=$(VERSION) \
--build-arg PACKAGE_REVISION=$(REVISION) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg BASE_IMAGE=nvcr.io/nvidia/cuda:${CUDA_VERSION}-base-ubuntu18.04 \
--tag $(IMAGE):$(vVERSION)-ubuntu18.04 \
--file Dockerfile.ubuntu \
$(BUILD_DIR)
$(DOCKER) run \
-v $$(pwd)/dist/$(@):/dist \
$(IMAGE):$(vVERSION)-$(@)

ubuntu20.04:
$(DOCKER) build --pull \
--build-arg PACKAGE_NAME=$(NAME) \
--build-arg PACKAGE_VERSION=$(VERSION) \
--build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) \
--build-arg PACKAGE_REVISION=$(REVISION) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg BASE_IMAGE=nvcr.io/nvidia/cuda:${CUDA_VERSION}-base-ubuntu20.04 \
Expand All @@ -76,7 +65,7 @@ ubuntu20.04:
ubi8:
$(DOCKER) build --pull \
--build-arg PACKAGE_NAME=$(NAME) \
--build-arg PACKAGE_VERSION=$(VERSION) \
--build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) \
--build-arg PACKAGE_REVISION=$(REVISION) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg BASE_IMAGE=nvcr.io/nvidia/cuda:${CUDA_VERSION}-base-ubi8 \
Expand Down

0 comments on commit 99631f4

Please sign in to comment.