summary refs log tree commit diff
path: root/pkgs/development/python-modules/tensorflow
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-02-15 12:30:52 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-02-15 12:32:44 +0100
commit97c3bebd92772359a3f0e03f5aa74f79e4aacfb7 (patch)
tree2688790a65becae32d26b99661fb6dadad627255 /pkgs/development/python-modules/tensorflow
parenta069c16c2240fecc69545b9b26c0becea8ac559d (diff)
downloadnixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar.gz
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar.bz2
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar.lz
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar.xz
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.tar.zst
nixlib-97c3bebd92772359a3f0e03f5aa74f79e4aacfb7.zip
tensorflowCuDNN -> tensorflowWithCuda
and move expression
Diffstat (limited to 'pkgs/development/python-modules/tensorflow')
-rw-r--r--pkgs/development/python-modules/tensorflow/cuda.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tensorflow/cuda.nix b/pkgs/development/python-modules/tensorflow/cuda.nix
new file mode 100644
index 000000000000..05a4cc3e4c18
--- /dev/null
+++ b/pkgs/development/python-modules/tensorflow/cuda.nix
@@ -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;
+  };
+}