Skip to content

Commit

Permalink
tensorflowCuDNN -> tensorflowWithCuda
Browse files Browse the repository at this point in the history
and move expression
  • Loading branch information
FRidh committed Feb 15, 2017
1 parent a069c16 commit 97c3beb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 35 deletions.
52 changes: 52 additions & 0 deletions pkgs/development/python-modules/tensorflow/cuda.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ stdenv
, fetchurl
, buildPythonPackage
, swig
, numpy
, six
, protobuf3_0
, cudatoolkit75
, cudnn5_cudatoolkit75
, gcc49
, zlib
, linuxPackages
, mock
}:

buildPythonPackage rec {
pname = "tensorflow";
version = "0.11.0rc0";
name = "${pname}-${version}";
format = "wheel";

src = fetchurl {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-${version}-cp27-none-linux_x86_64.whl";
sha256 = "1r8zlz95sw7bnjzg5zdbpa9dj8wmp8cvvgyl9sv3amsscagnnfj5";
};

buildInputs = [ swig ];
propagatedBuildInputs = [ numpy six protobuf3_0 cudatoolkit75 cudnn5_cudatoolkit75 gcc49 mock ];

# Note that we need to run *after* the fixup phase because the
# libraries are loaded at runtime. If we run in preFixup then
# patchelf --shrink-rpath will remove the cuda libraries.
postFixup = let
rpath = stdenv.lib.makeLibraryPath [
gcc49.cc.lib
zlib cudatoolkit75
cudnn5_cudatoolkit75
linuxPackages.nvidia_x11
];
in ''
find $out -name '*.so' -exec patchelf --set-rpath "${rpath}" {} \;
'';

doCheck = false;

meta = with stdenv.lib; {
description = "TensorFlow helps the tensors flow (no gpu support)";
homepage = http://tensorflow.org;
license = licenses.asl20;
platforms = platforms.linux;
};
}
36 changes: 1 addition & 35 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31247,41 +31247,7 @@ EOF

tensorflowWithoutCuda = callPackage ../development/python-modules/tensorflow { };


tensorflowCuDNN = buildPythonPackage rec {
name = "tensorflow";
version = "0.11.0rc0";
format = "wheel";

src = pkgs.fetchurl {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-${version}-cp27-none-linux_x86_64.whl";
sha256 = "1r8zlz95sw7bnjzg5zdbpa9dj8wmp8cvvgyl9sv3amsscagnnfj5";
};

buildInputs = with self; [ pkgs.swig ];
propagatedBuildInputs = with self; [ numpy six protobuf3_0 pkgs.cudatoolkit75 pkgs.cudnn5_cudatoolkit75 pkgs.gcc49 self.mock ];

# Note that we need to run *after* the fixup phase because the
# libraries are loaded at runtime. If we run in preFixup then
# patchelf --shrink-rpath will remove the cuda libraries.
postFixup = let rpath = stdenv.lib.makeLibraryPath [
pkgs.gcc49.cc.lib
pkgs.zlib pkgs.cudatoolkit75
pkgs.cudnn5_cudatoolkit75
pkgs.linuxPackages.nvidia_x11
]; in ''
find $out -name '*.so' -exec patchelf --set-rpath "${rpath}" {} \;
'';

doCheck = false;

meta = {
description = "TensorFlow helps the tensors flow (no gpu support)";
homepage = http://tensorflow.org;
license = licenses.asl20;
platforms = platforms.linux;
};
};
tensorflowWithCuda = callPackage ../development/python-modules/tensorflow/cuda.nix { };

tflearn = buildPythonPackage rec {
name = "tflearn-0.2.1";
Expand Down

0 comments on commit 97c3beb

Please sign in to comment.