From d4b6f83e19896f2df5d6ae7b7a30b64c6f199475 Mon Sep 17 00:00:00 2001 From: j4ckstraw Date: Wed, 13 Mar 2024 15:25:00 +0800 Subject: [PATCH 1/2] fix DOCKER_BUILDER in Makefile Signed-off-by: j4ckstraw --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 625107e05..efee1fec2 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec LINT_TIMEOUT ?= 15m -DOCKER_BUILDER ?= build # 'buildx build' +DOCKER_BUILDER ?= buildx build .PHONY: all all: build From f992948099b43edef1aec6927276c31fe15698f8 Mon Sep 17 00:00:00 2001 From: j4ckstraw Date: Wed, 13 Mar 2024 15:25:50 +0800 Subject: [PATCH 2/2] adjust koordlet.dockerfile commands sequence softwares installed by apt install is more stable than source code, install them first can make better use of the docker build cache Signed-off-by: j4ckstraw --- docker/koordlet.dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/koordlet.dockerfile b/docker/koordlet.dockerfile index f1362530b..21ab637ca 100644 --- a/docker/koordlet.dockerfile +++ b/docker/koordlet.dockerfile @@ -7,6 +7,15 @@ ENV VERSION $VERSION ENV GOOS linux ENV GOARCH $TARGETARCH +RUN apt update && apt install -y bash build-essential cmake wget +RUN wget https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.13.0.tar.gz && \ + echo "bcb52090f02bc7bcb5ac066494cd55bbd5084e65 libpfm-4.13.0.tar.gz" | sha1sum -c && \ + tar -xzf libpfm-4.13.0.tar.gz && \ + rm libpfm-4.13.0.tar.gz +RUN export DBG="-g -Wall" && \ + make -e -C libpfm-4.13.0 && \ + make install -C libpfm-4.13.0 + COPY go.mod go.mod COPY go.sum go.sum @@ -16,14 +25,6 @@ COPY apis/ apis/ COPY cmd/ cmd/ COPY pkg/ pkg/ -RUN apt update && apt install -y bash build-essential cmake wget -RUN wget https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.13.0.tar.gz && \ - echo "bcb52090f02bc7bcb5ac066494cd55bbd5084e65 libpfm-4.13.0.tar.gz" | sha1sum -c && \ - tar -xzf libpfm-4.13.0.tar.gz && \ - rm libpfm-4.13.0.tar.gz -RUN export DBG="-g -Wall" && \ - make -e -C libpfm-4.13.0 && \ - make install -C libpfm-4.13.0 RUN go build -a -o koordlet cmd/koordlet/main.go # The CUDA container images provide an easy-to-use distribution for CUDA supported platforms and architectures.