fix: make nvidia-gpu-driver work with glibc compat
This commit is contained in:
parent
195932adef
commit
622d12858a
4
Makefile
4
Makefile
@ -22,9 +22,9 @@ aports_update: aports
|
||||
GIT_DIR=aports/.git cd aports; git pull -p --squash origin master
|
||||
|
||||
# Mounts release into /work of the builder container to build all
|
||||
build: packages distfiles aports_update work
|
||||
build: packages distfiles work
|
||||
WORKDIR=$$(mktemp -d) && \
|
||||
podman run -ti --rm \
|
||||
podman run -it --rm \
|
||||
-v ${PWD}/distfiles:/var/cache/distfiles \
|
||||
-v ${PWD}/packages:/home/alpine/packages \
|
||||
-v $$WORKDIR:/home/alpine/work \
|
||||
|
@ -12,12 +12,12 @@ source="https://github.com/sgerrand/docker-glibc-builder/releases/download/$pkgv
|
||||
nsswitch.conf
|
||||
ld.so.conf"
|
||||
subpackages="$pkgname-bin $pkgname-dev $pkgname-i18n"
|
||||
triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"
|
||||
triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib:/lib64"
|
||||
options="!check lib64"
|
||||
|
||||
package() {
|
||||
conflicts="libc6-compat"
|
||||
mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc
|
||||
mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc
|
||||
cp -a "$srcdir"/usr "$pkgdir"
|
||||
cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf
|
||||
cp "$srcdir"/nsswitch.conf "$pkgdir"/etc/nsswitch.conf
|
||||
@ -52,5 +52,5 @@ i18n() {
|
||||
sha512sums="
|
||||
0aff0ec76f4d341957a792b8635c0770148eba9a5cb64f9bbd85228c14d9cb93c1a402063cab533a9f536f5f7be92c27bc5be8ed13c2b4f7aa416510c754d071 glibc-bin-2.35-0-x86_64.tar.gz
|
||||
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
|
||||
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf
|
||||
35f2c9e6cbada640b7c1b50e5d55d7f789864f8b12e419ed966422d99d911dedff96f63c6b3f7ab07b7434aedcd1bd4d45807d5e14f738053d169d11a88bfa53 ld.so.conf
|
||||
"
|
||||
|
@ -1,6 +1,6 @@
|
||||
# libc default configuration
|
||||
/usr/local/lib
|
||||
|
||||
include ld.so.conf.d/*.conf
|
||||
/usr/glibc-compat/lib
|
||||
/usr/lib
|
||||
/lib64
|
||||
/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
|
@ -8,7 +8,7 @@ url="https://github.com/NVIDIA/open-gpu-kernel-modules"
|
||||
arch="x86_64"
|
||||
license="MIT OR GPL-2.0"
|
||||
makedepends="bash linux-headers linux-virt-dev xz"
|
||||
options="!check !strip !tracedeps"
|
||||
options="!check !strip !tracedeps lib64"
|
||||
|
||||
source="nvidia-$pkgver.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$pkgver.tar.gz
|
||||
NVIDIA-Linux-x86_64-$pkgver.run::https://download.nvidia.com/XFree86/Linux-x86_64/$pkgver/NVIDIA-Linux-x86_64-$pkgver.run"
|
||||
@ -23,7 +23,7 @@ build() {
|
||||
|
||||
package() {
|
||||
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
||||
depends="glibc linux-virt=~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
||||
depends="glibc-bin linux-virt=~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
||||
|
||||
modules="nvidia.ko \
|
||||
nvidia-drm.ko \
|
||||
@ -40,9 +40,12 @@ package() {
|
||||
mkdir -p "$pkgdir"/lib/firmware/nvidia/"$pkgver"
|
||||
sh "$srcdir"/NVIDIA-Linux-x86_64-$pkgver.run -x -s && cp NVIDIA-Linux-x86_64-$pkgver/firmware/gsp.bin "$pkgdir"/lib/firmware/nvidia/"$pkgver"/gsp.bin
|
||||
|
||||
# Install basic nvidia-smi inck. libnvidia-ml
|
||||
mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/sbin
|
||||
cp NVIDIA-Linux-x86_64-$pkgver/libnvidia-ml.so."$pkgver" "$pkgdir"/usr/lib/libnvidia-ml.so.1
|
||||
#/bin/bash
|
||||
|
||||
# Install basic nvidia-smi inck. libnvidia-ml, libcuda into /lib64 as this is hardcoded in the nvidia-container-toolkit bins
|
||||
mkdir -p "$pkgdir"/lib64 "$pkgdir"/usr/sbin
|
||||
cp NVIDIA-Linux-x86_64-$pkgver/libnvidia-ml.so."$pkgver" "$pkgdir"/lib64/libnvidia-ml.so.1
|
||||
cp NVIDIA-Linux-x86_64-$pkgver/libcuda.so."$pkgver" "$pkgdir"/lib64/libcuda.so.1
|
||||
cp NVIDIA-Linux-x86_64-$pkgver/nvidia-smi "$pkgdir"/usr/sbin/nvidia-smi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user