Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base image should have kmod and xz-utils for closed-source Nvidia driver installation #18

Closed
ehough opened this issue Feb 19, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@ehough
Copy link
Owner

ehough commented Feb 19, 2019

In reference to #2, in particular this comment

@ehough ehough added the enhancement New feature or request label Feb 19, 2019
@ehough
Copy link
Owner Author

ehough commented Feb 19, 2019

@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.

@mviereck
Copy link

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

@ehough
Copy link
Owner Author

ehough commented Feb 19, 2019

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?

@mviereck
Copy link

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.

@mviereck
Copy link

mviereck commented Feb 19, 2019

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).

@ehough
Copy link
Owner Author

ehough commented Feb 20, 2019

@mviereck Super cool! Keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants