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
libtensorflow_2: add TensorFlow 2 as a library #103292
Conversation
system = | ||
if stdenv.isLinux then "linux" | ||
else if stdenv.isDarwin then "darwin" | ||
else unavailable; | ||
|
||
platform = | ||
if stdenv.isx86_64 then "x86_64" | ||
else unavailable; |
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.
Why all of this? Isn't meta.platforms enough?
It's the same way in @SuperSandro2000 Thanks for looking at this! |
Result of 1 package built:
|
c38a525
to
fc73613
Compare
@SuperSandro2000 Sorry for the long delay - for some reason, I did not see the check failure. Fixed it now. Anything I can do to move it along? |
|
||
with stdenv.lib; | ||
let | ||
unavailable = throw "libtensorflow is not available for this platform!"; |
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.
Please use broken and do not throw here or better platforms. I think that should be enough.
|
||
packages = import ./binary-hashes_2.nix; | ||
packageName = "${tfType}-${system}-${platform}"; | ||
url = packages.${packageName} or unavailable; |
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.
url = packages.${packageName} or unavailable; |
optionals cudaSupport [ cudatoolkit.out cudatoolkit.lib cudnn nvidia_x11 ]); | ||
|
||
packages = import ./binary-hashes_2.nix; | ||
packageName = "${tfType}-${system}-${platform}"; |
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.
packageName = "${tfType}-${system}-${platform}"; |
fc73613
to
7ad441f
Compare
7ad441f
to
58b572b
Compare
Result of 1 package built:
|
@Mic92 Thanks! |
Motivation for this change
libtensorflow is currently TensorFlow 1. Tensorflow 2 is available as a Python library, but not as a C library. I went with the naming convention of the Python TensorFlow 2.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)