Skip to content

Commit

Permalink
pythonPackages.tensorflow 1.1 -> 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jyp authored and abbradar committed Sep 25, 2017
1 parent 08b827a commit 01d53df
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 34 deletions.
58 changes: 25 additions & 33 deletions pkgs/development/python-modules/tensorflow/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{ stdenv
, fetchurl
, buildPythonPackage
, isPy36, isPy35, isPy27
, isPy36, isPy27
, cudaSupport ? false
, cudatoolkit ? null
, cudnn ? null
, linuxPackages ? null
, numpy
, six
, protobuf
, swig
, werkzeug
, mock
, backports_weakref
, zlib
}:

Expand All @@ -29,10 +28,10 @@ assert ! (stdenv.isDarwin && cudaSupport);

buildPythonPackage rec {
pname = "tensorflow";
version = "1.1.0";
version = "1.3.0";
name = "${pname}-${version}";
format = "wheel";
disabled = ! (isPy36 || isPy35 || isPy27);
disabled = ! (isPy36 || isPy27);

src = let
tfurl = sys: proc: pykind:
Expand All @@ -47,59 +46,45 @@ buildPythonPackage rec {
darwin.cpu = {
py2 = {
url = tfurl "mac" "cpu" "py2-none-any" ;
sha256 = "1fgf26lw0liqxc9pywc8y2mj8l1mv48nhkav0pag9vavdacb9mqr";
sha256 = "0nkymqbqjx8rsmc8vkc26cfsg4hpr6lj9zrwhjnfizvkzbbsh5z4";
};
py3 = {
url = tfurl "mac" "cpu" "py3-none-any" ;
sha256 = "0z5p1fra7bih0vqn618i2w3vyy8d1rkc72k7bmjq0rw8msl717ia";
sha256 = "1rj4m817w3lajnb1lgn3bwfwwk3qwvypyx11dim1ybakbmsc1j20";
};
};
linux-x86_64.cpu = {
py2 = {
url = tfurl "linux" "cpu" "cp27-none-linux_x86_64";
sha256 = "0ld3hqx3idxk0zcrvn3p9yqnmx09zsj3mw66jlfw6fkv5hznx8j2";
sha256 = "09pcyx0yfil4dm6cij8n3907pfgva07a38avrbai4qk5h6hxm8w9";
};
py35 = {
url = tfurl "linux" "cpu" "cp35-cp35m-linux_x86_64";
sha256 = "0ahz9222rzqrk43lb9w4m351klkm6mlnnvw8xfqip28vbmymw90b";
};
py36 = {
py3 = {
url = tfurl "linux" "cpu" "cp36-cp36m-linux_x86_64";
sha256 = "1a2cc8ihl94iqff76nxg6bq85vfb7sj5cvvi9sxy2f43k32fi4lv";
sha256 = "1qm8lm2f6bf9d462ybgwrz0dn9i6cnisgwdvyq9ssmy2f1gp8hxk";
};

};
linux-x86_64.cuda = {
py2 = {
url = tfurl "linux" "gpu" "cp27-none-linux_x86_64";
sha256 = "1baa9jwr6f8f62dyx6isbw8yyrd0pi1dz1srjblfqsyk1x3pnfvh";
};
py35 = {
url = tfurl "linux" "gpu" "cp35-cp35m-linux_x86_64";
sha256 = "0606m2awy0ifhniy8lsyhd0xc388dgrwksn87989xlgy90wpxi92";
sha256 = "10yyyn4g2fsv1xgmw99bbr0fg7jvykay4gb5pxrrylh7h38h6wah";
};
py36 = {
py3 = {
url = tfurl "linux" "gpu" "cp36-cp36m-linux_x86_64";
sha256 = "0lvbmfa87qzrajadpsf13gi3l71vryzkryzqfvkykivqrdjsvj8q";
sha256 = "12g3akkr083gs3sisjbmm0lpsk8phn3dvy7jjfadfxshqc7za14i";
};

};
};
in
fetchurl (
if stdenv.isDarwin then
if isPy27 then
dls.darwin.cpu.py2
else
if isPy36 then
dls.darwin.cpu.py3
else
dls.darwin.cpu.py2
else if isPy36 then
if cudaSupport then
dls.linux-x86_64.cuda.py36
else dls.linux-x86_64.cpu.py36
else if isPy35 then
if cudaSupport then
dls.linux-x86_64.cuda.py35
else dls.linux-x86_64.cpu.py35
dls.linux-x86_64.cuda.py3
else dls.linux-x86_64.cpu.py3
else
if cudaSupport then
dls.linux-x86_64.cuda.py2
Expand All @@ -108,9 +93,16 @@ buildPythonPackage rec {
);

propagatedBuildInputs = with stdenv.lib;
[ numpy six protobuf swig werkzeug mock ]
[ numpy six protobuf mock ]
++ optionals cudaSupport [ cudatoolkit cudnn stdenv.cc ];

installFlags = "--no-dependencies";
# tensorflow-gpu depends on tensorflow_tensorboard, which cannot be
# built at the moment (some of its dependencies do not build
# [htlm5lib9999999 (seven nines) -> tensorboard], and it depends on an old version of
# bleach) Hence we disable dependency checking for now.

This comment has been minimized.

Copy link
@mguentner

mguentner Nov 6, 2017

Contributor

Could you please create a ticket or mark python36Packages.tensorflow_tensorboard as broken? This is hidden way too deep.


# 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.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26057,7 +26057,7 @@ EOF
tensorflowWithCuda = callPackage ../development/python-modules/tensorflow {
cudaSupport = true;
cudatoolkit = pkgs.cudatoolkit8;
cudnn = pkgs.cudnn51_cudatoolkit80;
cudnn = pkgs.cudnn60_cudatoolkit80;
};

tflearn = buildPythonPackage rec {
Expand Down

0 comments on commit 01d53df

Please sign in to comment.