Skip to content
Merged
Show file tree
Hide file tree
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 Jul 30, 2026
9c7961b
feat: add no-GPU and unified variants for agent, MCV, and gkm-extract…
maryamtahhan Aug 6, 2026
f606c22
fix: decouple gkm.extract.image from MCV image in Makefile
maryamtahhan Aug 6, 2026
eea97bc
fix: update gkm.extract.image default to quay.io/gkm/gkm-extract in c…
maryamtahhan Aug 6, 2026
2f1bfa0
docs(mcv): update image variant docs to only show unified and no-gpu
maryamtahhan Aug 6, 2026
594d950
refactor: align Containerfile naming to .unified/.no-gpu convention
maryamtahhan Aug 6, 2026
dd7d969
ci: build and publish both MCV image variants in mcv-build-image work…
maryamtahhan Aug 6, 2026
95e87ca
fix: revert JobExtractImage back to quay.io/gkm/gkm-extract:latest
maryamtahhan Aug 6, 2026
0518296
fix(mcv): address PR #138 review findings
maryamtahhan Aug 6, 2026
2314722
fix(ci): fix remaining PR #138 review issues
maryamtahhan Aug 6, 2026
2739156
fix(mcv): address follow-up PR #138 review findings
maryamtahhan Aug 6, 2026
8893a0b
docs: fix stale NO_GPU_BUILD references and MCV/gkm-extract distinction
maryamtahhan Aug 6, 2026
f09b7d4
fix(mcv): store image URL in init file to detect image changes
maryamtahhan Aug 6, 2026
b7b6930
docs(mcv): align default-image examples with no-gpu :latest policy
maryamtahhan Aug 6, 2026
b18e119
fix(agent): align no-gpu image runtime with golang 1.25 glibc
maryamtahhan Aug 6, 2026
0a14e4f
fix(mcv): address remaining CodeRabbit follow-up items
maryamtahhan Aug 6, 2026
7da8fbc
fix(makefile): prefer NO_GPU image selection for Kind deploy
maryamtahhan Aug 6, 2026
c876363
fix(mcv): address Billy's PR #138 review comments
maryamtahhan Aug 10, 2026
da594b5
fix(docs): address remaining inline review comments on unified-mcv-co…
maryamtahhan Aug 10, 2026
d2ac7f7
fix(mcv): make ROCm installation arch-aware in amd64.dockerfile
maryamtahhan Aug 10, 2026
1c393b6
fix(agent,extract): make ROCm installation arch-aware in unified Cont…
maryamtahhan Aug 10, 2026
93bce53
docs: add mcv:latest warning and arm64 note to README and PR description
maryamtahhan Aug 10, 2026
b5acbfd
fix(mcv): simplify entrypoint to plain exec passthrough
maryamtahhan Aug 10, 2026
c7293bc
fix(docs,ci): address PR review comments and rename mcv Containerfile
maryamtahhan Aug 11, 2026
e51fbe9
fix(deploy,docs,extract): address pre-merge checklist items
maryamtahhan Aug 11, 2026
741e1de
fix(amd,extract): address remaining review findings
maryamtahhan Aug 11, 2026
5e1e972
fix(extract,mcv): address remaining inline and outside-diff review fi…
maryamtahhan Aug 11, 2026
2541146
fix(extract,mcv): address final review findings
maryamtahhan Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 53 additions & 10 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
image: operator
dockerfile: ./Containerfile.gkm-operator
context: .
platforms: linux/amd64
tags: |
type=ref,event=branch
type=ref,event=tag
Expand All @@ -43,33 +44,77 @@ jobs:
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}

# Agent unified: NVIDIA + AMD GPU support; :latest points here for backward compat
- registry: quay.io
repository: gkm
image: agent
dockerfile: ./Containerfile.gkm-agent
variant: unified
dockerfile: ./Containerfile.gkm-agent.unified
context: .
platforms: linux/amd64
tags: |
type=ref,event=branch,suffix=-unified
type=ref,event=tag,suffix=-unified
type=ref,event=pr,suffix=-unified
type=sha,format=long,suffix=-unified
type=raw,value=unified,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}

# Agent no-gpu: no CUDA/ROCm libraries, for arm64/mac/CI environments
- registry: quay.io
repository: gkm
image: agent
variant: no-gpu
dockerfile: ./Containerfile.gkm-agent.no-gpu
context: .
platforms: linux/amd64,linux/arm64
tags: |
type=ref,event=branch,suffix=-no-gpu
type=ref,event=tag,suffix=-no-gpu
type=ref,event=pr,suffix=-no-gpu
type=sha,format=long,suffix=-no-gpu
type=raw,value=no-gpu,enable={{is_default_branch}}

# GKM Extract unified: NVIDIA + AMD GPU support; :latest points here for backward compat
- registry: quay.io
repository: gkm
image: gkm-extract
dockerfile: ./Containerfile.gkm-extract
variant: unified
dockerfile: ./Containerfile.gkm-extract.unified
context: .
platforms: linux/amd64
tags: |
type=ref,event=branch,suffix=-unified
type=ref,event=tag,suffix=-unified
type=ref,event=pr,suffix=-unified
type=sha,format=long,suffix=-unified
type=raw,value=unified,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}

name: Build Image (${{ matrix.image.image }})
# GKM Extract no-gpu: no CUDA/ROCm libraries, for arm64/mac/CI environments
- registry: quay.io
repository: gkm
image: gkm-extract
variant: no-gpu
dockerfile: ./Containerfile.gkm-extract.no-gpu
context: .
platforms: linux/amd64,linux/arm64
tags: |
type=ref,event=branch,suffix=-no-gpu
type=ref,event=tag,suffix=-no-gpu
type=ref,event=pr,suffix=-no-gpu
type=sha,format=long,suffix=-no-gpu
type=raw,value=no-gpu,enable={{is_default_branch}}

name: Build Image (${{ matrix.image.image }}${{ matrix.image.variant && format('-{0}', matrix.image.variant) || '' }})
steps:
# Set a `push_flag`. This is only true if the github action is a push and the repository
# organization is `redhat-et`. This keeps credential fails from occurring on push to forks.
Expand Down Expand Up @@ -121,17 +166,15 @@ jobs:
id: build-push-image
uses: docker/build-push-action@v7
with:
platforms: linux/amd64
# platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
# builds with rocm will fail on linux/arm64
platforms: ${{ matrix.image.platforms }}
push: ${{ fromJSON(steps.set-push.outputs.push_flag) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ${{ matrix.image.dockerfile }}
build-args: BUILDPLATFORM=linux/amd64
context: ${{ matrix.image.context }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{ matrix.image.image }}-${{ matrix.image.variant || 'default' }}
cache-to: type=gha,mode=max,scope=${{ matrix.image.image }}-${{ matrix.image.variant || 'default' }}

- name: Sign the images with GitHub OIDC Token
if: ${{ fromJSON(steps.set-push.outputs.push_flag) }}
Expand Down
41 changes: 31 additions & 10 deletions .github/workflows/mcv-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,40 @@ jobs:
fail-fast: false
matrix:
image:
# Unified variant: NVIDIA (CUDA/NVML) + AMD (ROCm) support with auto-detection
- registry: quay.io
repository: gkm
image: mcv
dockerfile: ./mcv/images/amd64.dockerfile
variant: unified
target: mcv-unified
dockerfile: ./mcv/images/Containerfile
context: .
platforms: linux/amd64
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,format=long
# set latest tag for default branch
type=ref,event=branch,suffix=-unified
type=ref,event=tag,suffix=-unified
type=ref,event=pr,suffix=-unified
type=sha,format=long,suffix=-unified
type=raw,value=unified,enable={{is_default_branch}}
# No-GPU variant: no CUDA/ROCm libraries, for arm64/mac/CI environments
# :latest always resolves to the no-gpu variant (lighter, safer default)
- registry: quay.io
repository: gkm
image: mcv
variant: no-gpu
target: mcv-minimal
dockerfile: ./mcv/images/Containerfile
context: .
platforms: linux/amd64,linux/arm64
tags: |
type=ref,event=branch,suffix=-no-gpu
type=ref,event=tag,suffix=-no-gpu
type=ref,event=pr,suffix=-no-gpu
type=sha,format=long,suffix=-no-gpu
type=raw,value=no-gpu,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

name: Build Image (${{ matrix.image.image }})
name: Build Image (${{ matrix.image.image }}-${{ matrix.image.variant }})
steps:
# Set a `push_flag`. This is only true if the github action is a push and the repository
# organization is `redhat-et`. This keeps credential fails from occurring on push to forks.
Expand Down Expand Up @@ -92,15 +112,16 @@ jobs:
id: build-push-image
uses: docker/build-push-action@v7
with:
platforms: linux/amd64
platforms: ${{ matrix.image.platforms }}
push: ${{ github.event_name == 'push' && fromJSON(steps.set-push.outputs.push_flag) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ${{ matrix.image.dockerfile }}
target: ${{ matrix.image.target }}
build-args: BUILDPLATFORM=linux/amd64
context: ${{ matrix.image.context }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{ matrix.image.image }}-${{ matrix.image.variant }}
cache-to: type=gha,mode=max,scope=${{ matrix.image.image }}-${{ matrix.image.variant }}

- name: Sign the images with GitHub OIDC Token
if: ${{ fromJSON(steps.set-push.outputs.push_flag) }}
Expand Down
84 changes: 0 additions & 84 deletions Containerfile.gkm-agent

This file was deleted.

52 changes: 52 additions & 0 deletions Containerfile.gkm-agent.no-gpu
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"]
78 changes: 78 additions & 0 deletions Containerfile.gkm-agent.unified
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.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
ENTRYPOINT ["/agent"]
Loading
Loading