Skip to content

Commit

Permalink
add builder image updating to makefile targets
Browse files Browse the repository at this point in the history
This adds a docker pull so that the builder container is fresh and
latest patch version gets used.

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
  • Loading branch information
uniemimu committed Jun 13, 2023
1 parent 1e2274b commit 0342090
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gpu-aware-scheduling/Makefile
Expand Up @@ -20,7 +20,7 @@ LDFLAGS = \
-X main.goVersion=$(GOVERSION)


.PHONY: test all build image release-image format clean licenses mock e2e lint
.PHONY: test all build image release-image format clean licenses mock e2e lint update-baseimage

test:
go test ./... -v *_test.go
Expand All @@ -33,13 +33,16 @@ lint: format build
build:
CGO_ENABLED=0 GO111MODULE=on go build -ldflags="$(LDFLAGS)" -o $(BUILD_OUTPUT_DIR)/extender ./cmd/gas-scheduler-extender

update-baseimage:
docker pull golang:1.19

#note: you can speed up subsequent docker builds by doing "go mod vendor"
#note: you can further speed up subsequent docker builds by doing "make licenses"
image:
image: update-baseimage
docker build --build-arg GOLICENSES_VERSION=$(GOLICENSES_VERSION) --build-arg LOCAL_LICENSES=$(LOCAL_LICENSES) \
-f deploy/images/Dockerfile_gpu-extender ../ -t $(IMAGE_PATH)gpu-extender$(IMAGE_TAG)

release-image: clean
release-image: clean update-baseimage
docker build --build-arg GOLICENSES_VERSION=$(GOLICENSES_VERSION) -f deploy/images/Dockerfile_gpu-extender ../ \
-t $(IMAGE_PATH)gpu-extender$(IMAGE_TAG)

Expand Down

0 comments on commit 0342090

Please sign in to comment.