3
0
Fork 0
forked from mirrors/nixpkgs

cudnn*_cudatoolkit*: use public NVIDIA mirror (#31551)

* cudnn*_cudatoolkit*: use NVIDIA mirror instead of requireFile

* cudnn_cudatoolkit7: update hash since public mirror is different
This commit is contained in:
Luke Adams 2018-07-17 22:21:57 -05:00 committed by Orivej Desh (NixOS)
parent a88f959278
commit eba8679bc5
2 changed files with 8 additions and 13 deletions

View file

@ -9,10 +9,11 @@ in
{
cudnn_cudatoolkit_7 = generic rec {
version = "4.0";
# Old URL is v4 instead of v4.0 for some reason...
version = "4";
cudatoolkit = cudatoolkit_7;
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v${version}-prod.tgz";
sha256 = "0zgr6qdbc29qw6sikhrh6diwwz7150rqc8a49f2qf37j2rvyyr2f";
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v4.0-prod.tgz";
sha256 = "01a4v5j4v9n2xjqcc4m28c3m67qrvsx87npvy7zhx7w8smiif2fd";
};
cudnn_cudatoolkit_7_5 = generic rec {

View file

@ -5,24 +5,18 @@
{ stdenv
, lib
, requireFile
, cudatoolkit
, fetchurl
}:
stdenv.mkDerivation rec {
name = "cudatoolkit-${cudatoolkit.majorVersion}-cudnn-${version}";
inherit version;
src = requireFile rec {
name = srcName;
src = fetchurl {
# URL from NVIDIA docker containers: https://gitlab.com/nvidia/cuda/blob/centos7/7.0/runtime/cudnn4/Dockerfile
url = "https://developer.download.nvidia.com/compute/redist/cudnn/v${version}/${srcName}";
inherit sha256;
message = ''
This nix expression requires that ${name} is already part of the store.
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the cuDNN library
at https://developer.nvidia.com/cudnn, and run the following command in the download directory:
nix-prefetch-url file://\$PWD/${name}
'';
};
installPhase = ''