python3Packages.tensorflow-bin: Use CUDA 12, add Jetson support#334996
python3Packages.tensorflow-bin: Use CUDA 12, add Jetson support#334996SomeoneSerge merged 8 commits intoNixOS:masterfrom
Conversation
|
The formatting issues exist already. |
| inherit (pkgs.config) cudaSupport; | ||
| # https://www.tensorflow.org/install/source#gpu | ||
| cudaPackages = pkgs.cudaPackages_11; | ||
| cudaPackages = pkgs.cudaPackages_12; |
There was a problem hiding this comment.
can we drop this as cudaPackages is cudaPackges_12 ?
There was a problem hiding this comment.
Technically we could, but as this package is precompiled and hardcoded to use a specific CUDA version (e.g. libcudart.so.12), I'm not sure what the benefit would be.
The only time the CUDA version can be changed without breaking the package is when the package is updated, and when that happens it can be bumped like this. If we use cudaPackages, and that gets bumped without updating this package, this package breaks.
There was a problem hiding this comment.
Yeah I guess we should get rid of all -bin packages already pin -bin packages to concrete cuda releases
|
@ofborg eval |
| for f in tensorflow-*+nv*.whl; do | ||
| # e.g. *nv24.07* -> *nv24.7* | ||
| mv "$f" "$(sed -E 's/(nv[0-9]+)\.0*([0-9]+)/\1.\2/' <<< "$f")" | ||
| done | ||
|
|
There was a problem hiding this comment.
The file name from NVIDIA does not exactly match the name in the wheel metadata. wheel unpack does not like this inconsistency, and refuses to run.
There was a problem hiding this comment.
gotcha, let's please make a note of this in a code comment placed outside of the nix string
There was a problem hiding this comment.
This chunk was previously discussed at #334996 (comment). I agree this deserves a better note but also I don't think we should keep blocking this PR, it's been well over a month now
| # We keep this binary build for three reasons: | ||
| # - the source build doesn't work on Darwin. | ||
| # - the source build is currently brittle and not easy to maintain | ||
| # - the source build doesn't work on NVIDIA Jetson platforms |
There was a problem hiding this comment.
#271077, though will probably be other issues that arise once that is resolved too.
There was a problem hiding this comment.
ok, let's include a link to that in the comment
There was a problem hiding this comment.
Same, I think it's OK to add the note in a follow-up PR. This discussion is discoverable via git blame as long as github is online too. Besides we should be generally more aggressive about removing stale comments from code
|
@samuela I hope you don't mind |
Description of changes
NVIDIA provide prebuilt copies of TensorFlow for Jetsons, and these can be used with the existing
tensorflow-binpackage. Unfortunately, only Python 3.10 builds are available.No TensorRT support for now. No JAX either, though I'm not sure why that's a dependency in the first place.
tensorflow-binhas also been changed to use CUDA 12 for all platforms, as this is what versions >= 2.15.0 expect (https://www.tensorflow.org/install/source#gpu).Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.
@NixOS/cuda-maintainers @jyp @abbradar