Skip to content

Commit

Permalink
adjust koordlet.dockerfile commands sequence
Browse files Browse the repository at this point in the history
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 <j4ckstraw@foxmail.com>
  • Loading branch information
j4ckstraw committed Mar 13, 2024
1 parent d4b6f83 commit f992948
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docker/koordlet.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit f992948

Please sign in to comment.