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

fix: python torch override for mac - no cuda on mac #1036

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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