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
cudnn*_cudatoolkit*: use public NVIDIA mirror #31551
Conversation
It looks like we are allowed to distribute this lib as long as we include this copyright notice: https://gitlab.com/nvidia/cuda/blob/centos7/LICENSE#L1 |
Would including the license in the meta be acceptable? Or print it while the package is being built?
So it's a BSD license. I'll add that when I fix the hash. |
cudatoolkit = cudatoolkit7; | ||
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v${version}-prod.tgz"; | ||
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v4.0-prod.tgz"; | ||
sha256 = "0zgr6qdbc29qw6sikhrh6diwwz7150rqc8a49f2qf37j2rvyyr2f"; |
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.
output path ‘/nix/store/f1mc7z50dw66vdzjkp3ds03p7kn765sl-cudnn-7.0-linux-x64-v4.0-prod.tgz’ has sha256 hash ‘01a4v5j4v9n2xjqcc4m28c3m67qrvsx87npvy7zhx7w8smiif2fd’ when ‘0zgr6qdbc29qw6sikhrh6diwwz7150rqc8a49f2qf37j2rvyyr2f’ was expected
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.
Correct hash is 01a4v5j4v9n2xjqcc4m28c3m67qrvsx87npvy7zhx7w8smiif2fd
I'll update this PR friday
ec72fd0
to
a9d3e3c
Compare
@grahamc I fixed the hash issue and re-tested (rebased on master), all successfully downloaded and built. I added BSD3 to the license, but since the blobs being downloaded are unfree I left that in as well. |
a9d3e3c
to
157d34a
Compare
157d34a
to
4991963
Compare
4991963
to
79855ae
Compare
Rebased as of today |
@@ -49,7 +44,7 @@ stdenv.mkDerivation rec { | |||
meta = with stdenv.lib; { | |||
description = "NVIDIA CUDA Deep Neural Network library (cuDNN)"; | |||
homepage = "https://developer.nvidia.com/cudnn"; | |||
license = licenses.unfree; | |||
license = [ licenses.unfree licenses.bsd3 ]; |
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.
Does BSD3 apply to anything brought by this derivation, or is it just the license of Dockerfiles where you have found source URLs?
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.
That's just the license in the Dockerfiles repo, which I now realize is definitely not the cudnn license. It looks like this is the actual license on the NVIDIA site.
I can add the license to licenses.nix, something like
nvidia-cudnn = {
fullName = "NVIDIA SOFTWARE LICENSE AGREEMENT for cuDNN";
url = "http://docs.nvidia.com/deeplearning/sdk/pdf/cuDNN-SLA.pdf";
free = false;
};
cudnn
and friends have been posted to AUR with license proprietary
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.
IMHO just keeping the old unfree
is fine. Then it looks ready to merge.
79855ae
to
4a91d13
Compare
@orivej I dropped the bsd3 commit |
4a91d13
to
41e5be3
Compare
@orivej Rebased 2018-02-10 |
Rebased 2018-03-01 |
d008f93
to
01d433d
Compare
Rebased 2018-03-14, fixed merge conflict. Ready for review/merge |
cc @orivej @grahamc Since nox-review doesn't pick up the changes, the packages were tested with |
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.
👍
cc @matthewbauer I just rebased and tested it again. Any chance we could get this merged? |
Yeah looks good. Just to verify though - do we need to do anything special with the license in this case? If you thunk it is redistributable we should do unfreeRedistributable to the license. |
@matthewbauer orivej and I were talking about adding the CUDNN license on the nvidia site, but decided against it in favor of the license on the Dockerfile repo the source url is from. |
Thank you and sorry for the delay! |
:) no worries! Thanks to you both. |
@matthewbauer Hey sorry to ping you again, but is there a way to have Hydra build the cudnn/CUDA/tensorflowWithGpu packages but not cache the output (i.e. so it gets listed on hydra.nixos.org, but without allowing redistribution)? |
No, I don't think there is a way to do that. Nix doesn't really separate out licenses of "buildPackages" vs "hostPackages". Everything either evaluates or not. This ties into some of the cross stuff & what I think @nh2 is working on. At one point in time you could put
Or make up some other license for it. |
Awesome, I mentioned this a while ago. But if you want to do this on an older Nixpkgs hash this is what I did: # 7.0.5
wget 'https://developer.download.nvidia.com/compute/redist/cudnn/v7.0.5/cudnn-9.0-linux-x64-v7.tgz'
wget 'https://developer.download.nvidia.com/compute/redist/cudnn/v7.0.5/cudnn-9.1-linux-x64-v7.tgz'
# 7.1.4
wget 'https://developer.download.nvidia.com/compute/redist/cudnn/v7.1.4/cudnn-9.2-linux-x64-v7.1.tgz'
# then use nix-store or nix-prefetch-url to load them to the /nix/store
nix-store --add-fixed sha256 ./cudnn-9.0-linux-x64-v7.tgz
nix-prefetch-url file:://$(pwd)/cudnn-9.0-linux-x64-v7.tgz |
Motivation for this change
This PR dramatically simplifies the use of cudnn libraries on NixOS, which is used by most machine learning packages for gpu acceleration.
Previously, you would have to go through the NVIDIA developer portal and manually use nix-prefetch to add the tarballs to the store.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)