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

Search drivers on NixOS and WSL #16

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Search drivers on NixOS and WSL #16

merged 2 commits into from
Oct 11, 2024

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Aug 2, 2024

NixOS usually links drivers to /run/opengl-driver/lib, and WSL mounts drivers under /usr/lib/wsl/lib. Let's also search these paths.

NixOS usually put drivers under /run/opengl-driver/lib, and WSL mounts drivers under /usr/lib/wsl/lib. Let's also search these paths.
@Atry Atry changed the title Search drivers in NixOS and WSL Search drivers on NixOS and WSL Aug 3, 2024
Atry added a commit to Atry/nix-ml-ops that referenced this pull request Aug 3, 2024
- This PR removes $CUDA_HOME/lib from $LD_LIBRARY_PATH because bitsandbytes can follow PyTorch's CUDA runtime since bitsandbytes-foundation/bitsandbytes#1041, and setting $LD_LIBRARY_PATH for `bitsandbytes` is not necessary any more
- Hard-coded `/run/opengl-driver/lib` are removed because nix-gl-host can print the driver path for both Ubuntu and NixOS since numtide/nix-gl-host#16
- `link-nvidia-drivers.nix` is removed because drivers are instead copied to a cache directory by nix-gl-host
@picnoir
Copy link
Member

picnoir commented Aug 3, 2024

I'm a bit confused about the NixOS bit. Why do you need this tool on NixOS exactly, what's your use case?

@Atry
Copy link
Contributor Author

Atry commented Aug 3, 2024

Unpatched binaries need this tool (along with nix-ld-rs or ld-floxlib) in order to access GPU on NixOS.

@picnoir
Copy link
Member

picnoir commented Aug 3, 2024

Hmm, right, makes sense. That's not a use case I anticipated.

@Atry
Copy link
Contributor Author

Atry commented Oct 10, 2024

Do you want to merge this PR?

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will hurt to add those, so let's merge this

@zimbatm zimbatm merged commit 38b7dba into numtide:main Oct 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants