mirror of
https://github.com/ManInDark/bootc-image.git
synced 2026-01-20 22:44:28 +01:00
FIX: nvidia driver
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
FROM scratch AS ctx
|
||||
COPY build_files /
|
||||
|
||||
FROM ghcr.io/ublue-os/akmods-nvidia-open:main-43 AS nvidia-kernel
|
||||
FROM ghcr.io/bazzite-org/nvidia-drivers:latest-f43-x86_64 AS nvidia-packages
|
||||
|
||||
FROM quay.io/fedora/fedora-bootc:43
|
||||
|
||||
RUN rm -r /opt && mkdir /opt
|
||||
|
||||
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
|
||||
--mount=type=bind,from=nvidia-kernel,source=/,target=/nvidia-kernel \
|
||||
--mount=type=bind,from=nvidia-packages,src=/,dst=/nvidia-packages \
|
||||
--mount=type=cache,dst=/var/cache \
|
||||
--mount=type=cache,dst=/var/log \
|
||||
--mount=type=tmpfs,dst=/tmp \
|
||||
|
||||
@@ -19,13 +19,12 @@ curl -fsSLo /etc/yum.repos.d/vscode.repo https://packages.microsoft.com/yumrepos
|
||||
rpm-ostree install code
|
||||
rm /etc/yum.repos.d/vscode.repo
|
||||
|
||||
# https://rpmfusion.org/Howto/NVIDIA
|
||||
# https://www.tecmint.com/install-nvidia-drivers-in-linux
|
||||
|
||||
dnf5 install -y rpmdevtools akmods kmodtool
|
||||
dnf5 install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
dnf5 install -y akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda
|
||||
dnf5 remove -y rpmfusion-free-release rpmfusion-nonfree-release
|
||||
# this is a combination of bazzite & ublue-os nvidia installation
|
||||
# there is probably a better way to do it, but this works (I hope)
|
||||
dnf install -y \
|
||||
/nvidia-kernel/rpms/ublue-os/ublue-os-nvidia*.rpm \
|
||||
/nvidia-kernel/rpms/kmods/kmod-nvidia*.rpm \
|
||||
/nvidia-packages/nvidia-kmod-common-* \
|
||||
/nvidia-packages/nvidia-modprobe-5*
|
||||
|
||||
dnf5 clean all
|
||||
|
||||
Reference in New Issue
Block a user