Skip to content

Commit

Permalink
update github workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Huamin Chen <[email protected]>
  • Loading branch information
rootfs committed Dec 11, 2023
1 parent b8de4cd commit 1caa281
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 239 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ jobs:
username: ${{ secrets.username }}
password: ${{ secrets.password }}

- name: Build and push kepler latest (bcc)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: quay.io/sustainable_computing_io/kepler:latest-bcc
labels: latest-bcc
file: build/Dockerfile

- name: Build and push kepler latest (libbpf)
uses: docker/build-push-action@v5
with:
Expand All @@ -43,4 +33,4 @@ jobs:
push: true
tags: quay.io/sustainable_computing_io/kepler:latest
labels: latest
file: build/Dockerfile.libbpf.kepler
file: build/Dockerfile
24 changes: 0 additions & 24 deletions .github/workflows/image_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@ jobs:
registry: quay.io/sustainable_computing_io
username: ${{ secrets.BOT_NAME }}
password: ${{ secrets.BOT_TOKEN }}
- name: Build and push bcc-amd64
uses: docker/build-push-action@v5
with:
context: .
file: ./build/Dockerfile.bcc.base
platforms: linux/amd64
push: true
tags: quay.io/sustainable_computing_io/kepler_base:latest-bcc-amd64
- name: Build and push bcc-s390x
uses: docker/build-push-action@v5
with:
context: .
file: ./build/Dockerfile.bcc.base.s390x
platforms: linux/s390x
push: true
tags: quay.io/sustainable_computing_io/kepler_base:latest-bcc-s390x
- name: Build and push bcc-arm64
uses: docker/build-push-action@v5
with:
context: .
file: ./build/Dockerfile.bcc.base.arm64
platforms: linux/arm64
push: true
tags: quay.io/sustainable_computing_io/kepler_base:latest-bcc-arm64
- name: Build and push libbpf-amd64
uses: docker/build-push-action@v5
with:
Expand Down
123 changes: 0 additions & 123 deletions .github/workflows/integration_test_bcc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/platform-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
uses: sustainable-computing-io/[email protected]
with:
cluster_provider: ${{matrix.cluster_provider}}
ebpfprovider: bcc
ebpfprovider: libbpf
local_dev_cluster_version: v0.0.3
prometheus_enable: true
grafana_enable: true
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
# for each PR ensure for local developer usage
developer_local:
uses: ./.github/workflows/developer_local.yml
# for each PR run integration test
integration_test_bcc:
uses: ./.github/workflows/integration_test_bcc.yml
# for each PR run integration test
integration_test:
uses: ./.github/workflows/integration_test.yml
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ jobs:
username: ${{ secrets.BOT_NAME }}
password: ${{ secrets.BOT_TOKEN }}

- name: Build and push kepler latest bcc image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: quay.io/sustainable_computing_io/kepler:latest, quay.io/sustainable_computing_io/kepler:${{ github.event.inputs.release }}-bcc
labels: latest, ${{ github.event.inputs.release }}, bcc
file: build/Dockerfile

- name: Build and push kepler latest libbpf image
uses: docker/build-push-action@v5
with:
Expand All @@ -142,7 +132,7 @@ jobs:
push: true
tags: quay.io/sustainable_computing_io/kepler:latest, quay.io/sustainable_computing_io/kepler:${{ github.event.inputs.release }}
labels: latest, ${{ github.event.inputs.release }}, libbpf
file: build/Dockerfile.libbpf.kepler
file: build/Dockerfile

- name: Generate SBOM
uses: anchore/[email protected]
Expand Down
34 changes: 0 additions & 34 deletions Dockerfile

This file was deleted.

53 changes: 21 additions & 32 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
#
# This Dockerfile is used for building the kepler default image: Dockerfile.bcc.kepler
#
FROM quay.io/sustainable_computing_io/kepler_builder:ubi-9-libbpf-1.2.0 as builder

ARG BIN_TIMESTAMP
ARG SOURCE_GIT_TAG
WORKDIR /workspace

LABEL name=kepler-builder

ENV GOPATH=/opt/app-root GO111MODULE=off GOROOT=/usr/local/go

ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
COPY . .

WORKDIR $GOPATH/src/github.com/sustainable-computing-io/kepler
RUN ATTACHER_TAG=libbpf make build

FROM registry.access.redhat.com/ubi9-minimal:9.2
RUN microdnf -y update

COPY . .
RUN mkdir -p data
# Build kepler
RUN make build SOURCE_GIT_TAG=$SOURCE_GIT_TAG BIN_TIMESTAMP=$BIN_TIMESTAMP
RUN ls ./_output/bin
# RUN make test
ENV NVIDIA_VISIBLE_DEVICES=all

# build image
FROM quay.io/sustainable_computing_io/kepler_base:ubi-9-bcc-0.26
RUN INSTALL_PKGS=" \
libbpf \
" && \
microdnf install -y $INSTALL_PKGS && \
microdnf clean all

COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/_output/bin/kepler /usr/bin/kepler
COPY --from=builder /workspace/_output/bin/kepler /usr/bin/kepler
COPY --from=builder /libbpf-source/linux-5.14.0-333.el9/tools/bpf/bpftool/bpftool /usr/bin/bpftool
COPY --from=builder /usr/bin/cpuid /usr/bin/cpuid

RUN mkdir -p /var/lib/kepler/data
COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/data/cpus.yaml /var/lib/kepler/data/cpus.yaml

RUN mkdir -p /var/lib/kepler/bpfassets
COPY --from=builder /workspace/data/cpus.yaml /var/lib/kepler/data/cpus.yaml
COPY --from=builder /workspace/bpfassets/libbpf/bpf.o /var/lib/kepler/bpfassets

# copy model weight
COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/data/model_weight/acpi_AbsPowerModel.json /var/lib/kepler/data/acpi_AbsPowerModel.json
COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/data/model_weight/acpi_DynPowerModel.json /var/lib/kepler/data/acpi_DynPowerModel.json
COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/data/model_weight/rapl_AbsPowerModel.json /var/lib/kepler/data/rapl_AbsPowerModel.json
COPY --from=builder /opt/app-root/src/github.com/sustainable-computing-io/kepler/data/model_weight/rapl_DynPowerModel.json /var/lib/kepler/data/rapl_DynPowerModel.json

# pre install kernel sources
RUN mkdir -p /usr/share/kepler/kernel_sources

COPY --from=quay.io/sustainable_computing_io/kepler_kernel_source_images:ubi9 /usr/src/kernels /usr/share/kepler/kernel_sources

COPY --from=builder /workspace/data/model_weight/acpi_AbsPowerModel.json /var/lib/kepler/data/acpi_AbsPowerModel.json
COPY --from=builder /workspace/data/model_weight/acpi_DynPowerModel.json /var/lib/kepler/data/acpi_DynPowerModel.json
COPY --from=builder /workspace/data/model_weight/rapl_AbsPowerModel.json /var/lib/kepler/data/rapl_AbsPowerModel.json
COPY --from=builder /workspace/data/model_weight/rapl_DynPowerModel.json /var/lib/kepler/data/rapl_DynPowerModel.json
ENTRYPOINT ["/usr/bin/kepler"]

0 comments on commit 1caa281

Please sign in to comment.