Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Draft
JonBoyleCoding wants to merge 1 commit into nix-community:main
base: main
Choose a base branch
Loading
from JonBoyleCoding:torch-mac-fix

Conversation

@JonBoyleCoding
Copy link

@JonBoyleCoding JonBoyleCoding commented Aug 15, 2024

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!

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

@JonBoyleCoding JonBoyleCoding Aug 22, 2024

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.

phaer reacted with thumbs up emoji
@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

Reviewers

@phaer phaer phaer approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /