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

patchpkg: fix system CUDA lib search #2507

Merged
merged 1 commit into from
Feb 7, 2025
Merged

patchpkg: fix system CUDA lib search #2507

merged 1 commit into from
Feb 7, 2025

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Feb 7, 2025

As part of the auto-patching for CUDA, devbox searches for the system's libcuda (installed by the driver) and adds it to the Nix store. This fixes a couple of bugs with that search process:

  • When creating the soname links, the base name of the path to libcuda wasn't being used. This would lead to creating symlinks like "lib/libcuda.so.1", which would fail because a lib subdirectory didn't exist.
  • Ensure the src attribute is set in the patch flake so that devbox knows the path the flake source (which contains the copied libcuda) at build time.

As part of the auto-patching for CUDA, devbox searches for the system's
libcuda (installed by the driver) and adds it to the Nix store. This
fixes a couple of bugs with that search process:

- When creating the soname links, the base name of the path to libcuda
  wasn't being used. This would lead to creating symlinks like
  "lib/libcuda.so.1", which would fail because a lib subdirectory didn't
  exist.
- Ensure the `src` attribute is set in the patch flake so that devbox
  knows the path the flake source (which contains the copied libcuda) at
  build time.
@gcurtis gcurtis requested review from savil and mikeland73 and removed request for savil February 7, 2025 15:16
@gcurtis gcurtis merged commit 0e154db into main Feb 7, 2025
29 checks passed
@gcurtis gcurtis deleted the gcurtis/patch-fixes branch February 7, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants