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

--gpu doesn't install drivers automatically anymore #198

Closed
01e9 opened this issue Nov 24, 2019 · 7 comments
Closed

--gpu doesn't install drivers automatically anymore #198

01e9 opened this issue Nov 24, 2019 · 7 comments
Labels

Comments

@01e9
Copy link

01e9 commented Nov 24, 2019

  1. The x11docker script
  2. The driver is prepared in the right directory
  3. Output doesn't contain "installing driver..." and container starts fast.
@mviereck mviereck added the bug label Nov 24, 2019
@mviereck
Copy link
Owner

mviereck commented Nov 24, 2019

Thank you for the report!

I did a test run with the current master version, it works well so far.
Can you please show me the output with option --debug? What is your x11docker version?

Maybe this check fails, could you please try it out?

head -n1 2>/dev/null </proc/driver/nvidia/version | awk '{ print $8 }'

It should print 390.116 on your system.

@01e9
Copy link
Author

01e9 commented Nov 24, 2019

With --debug https://pastebin.com/raw/6BhncsRy
Driver version and installer are detected properly but installation is not starting.

mviereck added a commit that referenced this issue Nov 25, 2019
Fix NVIDIA driver detection with --cap-default #198
@mviereck
Copy link
Owner

Ok, it is fixed now.
It only happened along with --cap-default, so i missed it first. It was only one : missing in the code. :)
Please update to current master. I'll publish a new release soon.

@01e9
Copy link
Author

01e9 commented Nov 25, 2019

Fixed. Thanks!

@mviereck
Copy link
Owner

mviereck commented Dec 9, 2019

I did a change in latest commit that affects the NVIDIA driver installation, too.

x11docker's root setup in container now runs with --privileged flag. This gives all privileges that are needed to install the driver. The final container command on the other hand does not need or get any privileges anymore.

Could you please run two tests for me?
This should just work and show the NVIDIA card name:

x11docker --gpu x11docker/check glxinfo | grep renderer

This one might fail:

x11docker --gpu --init=systemd --newprivileges=no x11docker/check glxinfo | grep renderer

I need to check if --newprivileges=no makes a difference here.
With --init=systemd x11docker takes another code path that does not give --privileged to containerrootrc.

Background:
Earlier the NVIDIA driver did not need --newprivileges=yes. Later the driver installation failed and needed --newprivileges=yes (automatically enabled).
Now it works in my tests with --newprivileges=no again.

It is confusing and I assume that there has been a docker bug for some time.
With my current Docker version 19.03.5 the installation succeeds with --newprivileges=no.

@01e9
Copy link
Author

01e9 commented Dec 9, 2019

$ uname -a
Linux d 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux



$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic



$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:29:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:22 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

@mviereck
Copy link
Owner

Thank you!
So it seems the driver installation succeeds again without --newprivileges=yes. Maybe I can disable that in the code again.
It has been an issue in #162. I'll ask there for a check, too.

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

No branches or pull requests

2 participants