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

[Error] Nvidia integration fails on WSL2 ubuntu 22.04 host #1123

Closed
ozzdemir opened this issue Dec 29, 2023 · 0 comments
Closed

[Error] Nvidia integration fails on WSL2 ubuntu 22.04 host #1123

ozzdemir opened this issue Dec 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ozzdemir
Copy link

Describe the bug

Nvidia integrations on WSL2 ubuntu Host fails, with error message filesystem was mounted, but any subsequent operation failed: Unknown error 5005. But I am not sure about whether it is related to WSL2 or not, since I did not use --nvidia in my previous uses of distrobox. The problem seems to be related to ro mount of the libraries (containers/toolbox#1084 (comment) has the same error message).

To Reproduce
Steps to reproduce the behavior:

In a WSL2 ubuntu, install distrobox and create a image with --nvidia flag

$ distrobox create --name test --image ubuntu:22.04 --init --nvidia
Creating 'test' using image ubuntu:22.04         [ OK ]
Distrobox 'test' successfully created.
To enter, run:

distrobox enter test

$ distrobox enter test
Starting container...                            [ OK ]
printf distrobox: Installing basic packages...
Installing basic packages...     [ OK ]
Setting up devpts mounts...                      [ OK ]
printfdistrobox: Setting up read-only mounts...  [ OK ]
distrobox: Setting up read-write mounts...       [ OK ]
Setting up host's sockets integration...         [ OK ]
Setting up host's nvidia integration...
 Warning: failed to bind mount /run/host/usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1 to /usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1 Error: An error occurred

Expected behavior
Nvidia integration to succeed without any problem

Logs
Run the commands with --verbose and post the log here as a file upload
distrobox_enter_verbose.txt

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod?
    • podman
  • Which version or podman, docker or lilipod?
    • 3.4.4
  • Which version of distrobox?
    • 1.6.0.1
  • Which host distribution?
    • ubuntu 22.04
  • How did you install distrobox?
    • With apt from the following ppa:
    • sudo add-apt-repository ppa:michel-slm/distrobox

Additional context

+ mount --rbind -o ro /run/host/usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1 /usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1
mount: /usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.
Warning: failed to bind mount /run/host/usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1 to /usr/lib/wsl/drivers/nvhm.inf_amd64_ef9786a6f396f598/libnvidia-encode.so.1

@ozzdemir ozzdemir added the bug Something isn't working label Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant