forked from sustainable-computing-io/kepler
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Huamin Chen <[email protected]>
- Loading branch information
Showing
8 changed files
with
24 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |