-
Notifications
You must be signed in to change notification settings - Fork 6
feat(mcv): add --no-gpu support for cache creation without GPU hardware #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
228475e
feat: unify GKM agent and MCV image for NVIDIA+AMD GPU support
maryamtahhan 9c7961b
feat: add no-GPU and unified variants for agent, MCV, and gkm-extract…
maryamtahhan f606c22
fix: decouple gkm.extract.image from MCV image in Makefile
maryamtahhan eea97bc
fix: update gkm.extract.image default to quay.io/gkm/gkm-extract in c…
maryamtahhan 2f1bfa0
docs(mcv): update image variant docs to only show unified and no-gpu
maryamtahhan 594d950
refactor: align Containerfile naming to .unified/.no-gpu convention
maryamtahhan dd7d969
ci: build and publish both MCV image variants in mcv-build-image work…
maryamtahhan 95e87ca
fix: revert JobExtractImage back to quay.io/gkm/gkm-extract:latest
maryamtahhan 0518296
fix(mcv): address PR #138 review findings
maryamtahhan 2314722
fix(ci): fix remaining PR #138 review issues
maryamtahhan 2739156
fix(mcv): address follow-up PR #138 review findings
maryamtahhan 8893a0b
docs: fix stale NO_GPU_BUILD references and MCV/gkm-extract distinction
maryamtahhan f09b7d4
fix(mcv): store image URL in init file to detect image changes
maryamtahhan b7b6930
docs(mcv): align default-image examples with no-gpu :latest policy
maryamtahhan b18e119
fix(agent): align no-gpu image runtime with golang 1.25 glibc
maryamtahhan 0a14e4f
fix(mcv): address remaining CodeRabbit follow-up items
maryamtahhan 7da8fbc
fix(makefile): prefer NO_GPU image selection for Kind deploy
maryamtahhan c876363
fix(mcv): address Billy's PR #138 review comments
maryamtahhan da594b5
fix(docs): address remaining inline review comments on unified-mcv-co…
maryamtahhan d2ac7f7
fix(mcv): make ROCm installation arch-aware in amd64.dockerfile
maryamtahhan 1c393b6
fix(agent,extract): make ROCm installation arch-aware in unified Cont…
maryamtahhan 93bce53
docs: add mcv:latest warning and arm64 note to README and PR description
maryamtahhan b5acbfd
fix(mcv): simplify entrypoint to plain exec passthrough
maryamtahhan c7293bc
fix(docs,ci): address PR review comments and rename mcv Containerfile
maryamtahhan e51fbe9
fix(deploy,docs,extract): address pre-merge checklist items
maryamtahhan 741e1de
fix(amd,extract): address remaining review findings
maryamtahhan 5e1e972
fix(extract,mcv): address remaining inline and outside-diff review fi…
maryamtahhan 2541146
fix(extract,mcv): address final review findings
maryamtahhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Build the agent binary | ||
| FROM golang:1.25-trixie AS builder | ||
|
|
||
| WORKDIR /workspace | ||
|
|
||
| # Install required system packages | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| libgpgme-dev \ | ||
| btrfs-progs \ | ||
| libbtrfs-dev \ | ||
| libgpgme11-dev \ | ||
| libseccomp-dev \ | ||
| pkg-config \ | ||
| build-essential && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy the Go Modules manifests | ||
| COPY go.mod go.mod | ||
| COPY go.sum go.sum | ||
|
|
||
| # Copy the go source | ||
| COPY agent/main.go agent/main.go | ||
| COPY api/ api/ | ||
| COPY pkg/ pkg/ | ||
| COPY internal/controller/ internal/controller/ | ||
| COPY vendor/ vendor/ | ||
| COPY Makefile Makefile | ||
|
|
||
| # Build the agent binary | ||
| RUN make build-gkm-agent | ||
|
|
||
| # No GPU runtime - debian:trixie-slim matches golang:1.25-trixie (glibc 2.38+). | ||
| # No CUDA or ROCm libraries; GPU detection is disabled at runtime via --no-gpu flag. | ||
| FROM debian:trixie-slim | ||
|
|
||
| COPY --from=builder /workspace/bin/gkm-agent /agent | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| libgpgme11t64 \ | ||
| libbtrfs0t64 \ | ||
| libffi8 \ | ||
| libc6 \ | ||
| libseccomp2 && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Run as non-root (no GPU device access required in no-gpu mode) | ||
| USER 65532:65532 | ||
|
|
||
| ENTRYPOINT ["/agent"] |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Build the agent binary | ||
| FROM public.ecr.aws/docker/library/golang:1.25 AS builder | ||
|
|
||
| WORKDIR /workspace | ||
|
|
||
| # Install required system packages | ||
| RUN apt-get update && \ | ||
| apt-get install -y \ | ||
| libgpgme-dev \ | ||
| btrfs-progs \ | ||
| libbtrfs-dev \ | ||
| libgpgme11-dev \ | ||
| libseccomp-dev \ | ||
| pkg-config \ | ||
| build-essential && \ | ||
| apt-get clean | ||
|
|
||
| # Copy the Go Modules manifests | ||
| COPY go.mod go.mod | ||
| COPY go.sum go.sum | ||
|
|
||
| # Copy the go source | ||
| COPY agent/main.go agent/main.go | ||
| COPY api/ api/ | ||
| COPY pkg/ pkg/ | ||
| COPY internal/controller/ internal/controller/ | ||
| COPY vendor/ vendor/ | ||
| COPY Makefile Makefile | ||
|
|
||
| # Build the agent binary | ||
| RUN make build-gkm-agent | ||
|
|
||
| # NVIDIA CUDA base provides libnvidia-ml.so.1 for NVIDIA GPU detection via NVML. | ||
| # ROCm tools (amd-smi, rocm-smi) are installed for AMD GPU detection. | ||
| # A single image supports both GPU vendors; auto-detection occurs at runtime. | ||
| FROM nvcr.io/nvidia/cuda:12.6.3-base-ubuntu24.04 | ||
|
|
||
| COPY --from=builder /workspace/bin/gkm-agent /agent | ||
|
|
||
| ARG TARGETARCH | ||
| ARG ROCM_VERSION=7.0.1 | ||
| ARG AMDGPU_VERSION=7.0.1.70001 | ||
|
|
||
| # Install runtime dependencies (Ubuntu 24.04 / noble package names) | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| libgpgme11t64 \ | ||
| libbtrfs0 \ | ||
| libffi8 \ | ||
| libc6 \ | ||
| libseccomp2 \ | ||
| hwdata && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install ROCm for AMD GPU detection (amd64 only; ROCm has no arm64 packages). | ||
| # On arm64 the image still provides NVIDIA/NVML support via the CUDA base. | ||
| # Using Ubuntu 22.04 (jammy) packages as ROCm does not yet officially support Ubuntu 24.04. | ||
| RUN if [ "$TARGETARCH" = "amd64" ]; then \ | ||
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| wget pciutils gnupg2 python3-setuptools python3-wheel \ | ||
| curl dialog rsync lsb-release software-properties-common && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/jammy/amdgpu-install_${AMDGPU_VERSION}-1_all.deb && \ | ||
| apt-get update && \ | ||
| DEBIAN_FRONTEND=noninteractive apt-get install -y ./*.deb && \ | ||
| apt-get update && \ | ||
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends amd-smi-lib rocm-smi-lib && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* ./*.deb && \ | ||
| ln -s /opt/rocm-${ROCM_VERSION}/bin/amd-smi /usr/bin/amd-smi && \ | ||
| ln -s /opt/rocm-${ROCM_VERSION}/bin/rocm-smi /usr/bin/rocm-smi; \ | ||
| fi | ||
|
|
||
| # Runs as root: GPU device files (/dev/kfd, /dev/dri) require group membership | ||
| # that is not available in the 65532 nonroot user; root is the practical choice | ||
| # for containers that must detect AMD/NVIDIA hardware at runtime. | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| ENTRYPOINT ["/agent"] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.