Skip to content

Commit

Permalink
get kernel from akmods-nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles committed Feb 22, 2025
1 parent 7806bc7 commit 1abf333
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
exit 1
fi
echo "SOURCE_IMAGE_VERSION=$ver" >> $GITHUB_ENV
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/${{ matrix.kernel_flavor }}-kernel:${{ matrix.fedora_version }} > kernel.json
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ matrix.kernel_flavor }}-${{ matrix.fedora_version }} > kernel.json
linux=$(jq -r '.Labels["ostree.linux"]' kernel.json)
if [ -z "$linux" ] || [ "null" = "$linux" ]; then
echo "inspected image linux version must not be empty or null"
Expand All @@ -202,7 +202,6 @@ jobs:
# we can retry on that unfortunately common failure case
podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }}
podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ matrix.kernel_flavor }}-${{ matrix.fedora_version }}
podman pull ${{ env.IMAGE_REGISTRY }}/${{ matrix.kernel_flavor}}-kernel:${{ env.KERNEL_VERSION }}
# Build metadata
- name: Image Metadata
Expand Down Expand Up @@ -230,6 +229,7 @@ jobs:
tags: |
${{ steps.generate-tags.outputs.alias_tags }}
build-args: |
FULL_IMAGE_NAME=${{ env.IMAGE_NAME }}
IMAGE_NAME=${{ matrix.image_name }}
SOURCE_IMAGE=${{ env.SOURCE_IMAGE }}
FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }}
Expand Down
3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=akmods_nvidia,src=/rpms,dst=/tmp/akmods-rpms \
mkdir -p /var/lib/alternatives && \
if [ ! -x /usr/bin/dnf5 ]; then \
rpm-ostree install --idempotent dnf5 dnf5-plugins \
rpm-ostree install --idempotent dnf5 dnf5-plugins && \
dnf5 versionlock add kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra \
; fi && \
IMAGE_FLAVOR=nvidia /ctx/image-info.sh && \
NVIDIA_FLAVOR=nvidia /ctx/nvidia-install.sh && \
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ fi
if [[ ! -x /usr/bin/dnf5 ]]; then
rpm-ostree install --idempotent dnf5 dnf5-plugins
fi
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
if [[ "${FULL_IMAGE_NAME}" =~ nvidia ]]; then
dnf5 versionlock add kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
fi
if [[ "${IMAGE_NAME}" =~ surface-nvidia ]]; then
if [[ "${FULL_IMAGE_NAME}" =~ surface-nvidia ]]; then
dnf5 versionlock add kernel-surface kernel-surface-core kernel-surface-modules kernel-surface-modules-core kernel-surface-modules-extra
fi

Expand Down

0 comments on commit 1abf333

Please sign in to comment.