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
pytorch: Move cudatoolkit to nativeBuildInputs #60002
Conversation
nvcc must be available in PATH at build time; otherwise CUDA support will be disabled. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I tried your patch, but unfortunately the build did not go through. Here is the tail of the build:
|
@jyp It sounds like you’ve run into a different problem: the Nix package expects to use the packaged CUDA and cuDNN in |
Clearly sandboxing was disabled in @jyp's build. |
Indeed it works using sandbox. (I was confused by #51671) |
I'm here after reading this and a few related issues (eg. #51671). Here is my
However, during the build, there were several messages like "CUDA not available, skipping tests". Maybe relatedly, there were errors like "Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present". I can provide a full log if need be. Additional outputs:
In a python session:
I'm still pretty new to nix, so I might be doing something wrong. Should this have worked/what can I do to fix it? |
@mtn These errors were fixed for me when using a sandboxed build. |
I have the same problem as @mtn and I have no idea how to resolve on 19.03 |
@mtn @fkstef I just ran into this problem and spent a long time trying to solve it. The answer is actually quite simple. This fix has not been backported to 19.03. You can either pin to this fix using pinning or use an overrideAttr directive. I did the second, but the first might be more useful if you're planning on a long term thing. For instance, here is an example shell.nix
|
Motivation for this change
nvcc
must be available inPATH
at build time; otherwise CUDA support will be disabled.This is a more minimal version of #57438.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)