diff --git a/main/build.sh b/main/build.sh index acd60c8..6cb7b39 100755 --- a/main/build.sh +++ b/main/build.sh @@ -22,11 +22,6 @@ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo # add tailscale repo curl -L https://pkgs.tailscale.com/stable/fedora/tailscale.repo -o /etc/yum.repos.d/tailscale.repo -## add rpmfusion (needed for nvidia akmods, etc) -#rpm-ostree install \ -# https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${RELEASE}.noarch.rpm \ -# https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${RELEASE}.noarch.rpm - #### INSTALL ## install ZFS (and sanoid deps) if tagged diff --git a/nvidia/Containerfile b/nvidia/Containerfile index c83e3e9..2bfb5f2 100644 --- a/nvidia/Containerfile +++ b/nvidia/Containerfile @@ -7,12 +7,11 @@ FROM ghcr.io/ublue-os/${IMAGE_NAME}:${PR_PREFIX}${COREOS_VERSION}${ZFS_TAG} ARG COREOS_VERSION="${COREOS_VERSION:-stable}" ARG IMAGE_NAME="${IMAGE_NAME:-ucore}" -ARG NVIDIA_MAJOR_VERSION="${NVIDIA_MAJOR_VERSION:-535}" +ARG KMOD_SRC="${KMOD_SRC:-ghcr.io/ublue-os/ucore-kmods:${COREOS_VERSION}}" ADD build.sh /tmp/build.sh -COPY --from=ghcr.io/ublue-os/ucore-kmods:${COREOS_VERSION} /rpms/kmods/nvidia/ublue*.rpm /tmp/rpms/ -COPY --from=ghcr.io/ublue-os/ucore-kmods:${COREOS_VERSION} /rpms/kmods/nvidia/${NVIDIA_MAJOR_VERSION} /tmp/rpms/ +COPY --from=${KMOD_SRC} /rpms/kmods/nvidia/ /tmp/rpms/ RUN mkdir -p /var/lib/alternatives \ && /tmp/build.sh \ diff --git a/nvidia/build.sh b/nvidia/build.sh index 2f50edb..9c57037 100755 --- a/nvidia/build.sh +++ b/nvidia/build.sh @@ -2,14 +2,18 @@ set -ouex pipefail +# repo for nvidia builds +curl -sL --output-dir /etc/yum.repos.d --remote-name \ + https://negativo17.org/repos/fedora-nvidia.repo + find /tmp/rpms rpm-ostree install /tmp/rpms/ublue-os-ucore-nvidia-*.rpm sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-runtime.repo -source /tmp/rpms/nvidia-vars +cat /tmp/rpms/nvidia-vars rpm-ostree install \ - xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION} \ - nvidia-container-toolkit \ - /tmp/rpms/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm + /tmp/rpms/kmod-nvidia-*.rpm \ + nvidia-driver-cuda \ + nvidia-container-toolkit