Closed ehough closed 5 years ago
@mviereck in my testing, you can skip the installation of xz-utils
(or xz
) as it seems that the NVIDIA installer falls back to an embedded decompressor if xz
is missing.
Check out line 747 of https://http.download.nvidia.com/XFree86/Linux-x86_64/415.25/NVIDIA-Linux-x86_64-415.25.run.
it seems that the NVIDIA installer falls back to an embedded decompressor if xz is missing.
Indeed, that is interesting. That has not been the case in earlier versions of the installer. If I find out at which point this was included, I can skip xz
installation after a version check. Or x11docker just parses the installer for this fallback check (but that might fail if the installer code changes).
I believe that modprobe
from kmod
should be needless, too. It is important for kernel module creating, but that is skipped in x11docker with --no-nvidia-modprobe
and related options. However, the installer fails without it. Maybe providing a dummy modprobe
could fool the installer.
Compare:
sh /tmp/NVIDIA-installer.run \
--accept-license --ui=none --no-questions --no-backup \
--no-runlevel-check --no-kernel-module --no-kernel-module-source \
--no-nouveau-check --no-nvidia-modprobe
Maybe providing a dummy
modprobe
could fool the installer.
I think that might have worked! I did this (essentially):
$ docker run -it --rm debian:stable-slim
# apt-get update && apt-get install wget ca-certificates
# wget "https://http.download.nvidia.com/XFree86/Linux-x86_64/415.25/NVIDIA-Linux-x86_64-415.25.run"
# touch /sbin/modprobe /sbin/rmmod /bin/lsmod /sbin/depmod
# chmod +x /sbin/modprobe /sbin/rmmod /bin/lsmod /sbin/depmod
# sh ./NVIDIA-Linux-x86_64-415.25.run --tmpdir ./tmp2 --accept-license --no-runlevel-check --no-questions --no-backup --ui=none --no-kernel-module --no-kernel-module-source --no-nouveau-check --no-nvidia-modprobe
and it seemed to run without errors. It's a little hacky, but creating 4 dummy files sure beats installing kmod
, in my opinion.
Do you think that's something you might want to integrate into x11docker
?
I think that might have worked!
Great! Thank you for checking that out.
Do you think that's something you might want to integrate into
x11docker
?
Yes, I am already integrating it in a similar way using softlinks to /bin/true
that are removed later.
Re: xz
I'll check older driver versions for xz
dependency. However, as some NVIDIA cards need older driver versions, this dependency might not be dropped. If there is a statically linked version of xz
available for download anywhere, that could be a faster alternative compared to the package managers.
Success!
Latest release x11docker 5.4.3 does not need xz
and kmod
anymore for NVIDIA driver installation.
Old driver versions can self-extract, too, not sure why I thought something different. (At least down to 390.48).
@mviereck Super cool! Keep up the great work!
In reference to #2, in particular this comment