Skip to content

Conversation

JonBoyleCoding
Copy link

Adding torch to a project on mac failed as there are no cudaPackages.

The fix should only enable cuda if Linux is detected.

Copy link
Member

@phaer phaer left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -9,12 +9,14 @@
# use the autoAddOpenGLRunpathHook to add /run/opengl-driver/lib to the RPATH
# of all ELF files
deps = {nixpkgs, ...}: {
inherit (nixpkgs.cudaPackages) autoAddOpenGLRunpathHook;
inherit (nixpkgs.stdenv) isLinux;
autoAddOpenGLRunpathHook = lib.optionalAttribute nixpkgs.stdenv.isLinux nixpkgs.cudaPackages.autoAddOpenGLRunpathHook;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think lib.optionalAttribute is a thing?

Copy link
Author

Choose a reason for hiding this comment

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

I don't know how I messed that up! I will look into and fix.

@JonBoyleCoding JonBoyleCoding marked this pull request as draft August 24, 2024 00:18
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.

2 participants