python.pkgs.tensorflow 1.7.0 -> 1.9.0
This commit is contained in:
parent
173a3d27e6
commit
8162378401
@ -10,6 +10,7 @@
|
|||||||
, termcolor
|
, termcolor
|
||||||
, protobuf
|
, protobuf
|
||||||
, absl-py
|
, absl-py
|
||||||
|
, grpcio
|
||||||
, mock
|
, mock
|
||||||
, backports_weakref
|
, backports_weakref
|
||||||
, enum34
|
, enum34
|
||||||
@ -38,38 +39,31 @@ let
|
|||||||
|
|
||||||
in buildPythonPackage rec {
|
in buildPythonPackage rec {
|
||||||
pname = "tensorflow";
|
pname = "tensorflow";
|
||||||
version = "1.7.1";
|
version = "1.9.0";
|
||||||
format = "wheel";
|
format = "wheel";
|
||||||
|
|
||||||
src = let
|
src = let
|
||||||
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.majorVersion}";
|
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.majorVersion}";
|
||||||
version = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot;
|
pyver = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot;
|
||||||
platform = if stdenv.isDarwin then "mac" else "linux";
|
platform = if stdenv.isDarwin then "mac" else "linux";
|
||||||
unit = if cudaSupport then "gpu" else "cpu";
|
unit = if cudaSupport then "gpu" else "cpu";
|
||||||
key = "${platform}_py_${version}_${unit}";
|
key = "${platform}_py_${pyver}_${unit}";
|
||||||
dls = import ./tf1.7.1-hashes.nix;
|
dls = import ./tf1.9.0-hashes.nix;
|
||||||
in fetchurl dls.${key};
|
in fetchurl dls.${key};
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy six protobuf absl-py astor gast termcolor ]
|
propagatedBuildInputs = [ protobuf numpy termcolor grpcio six astor absl-py gast tensorflow-tensorboard ]
|
||||||
++ lib.optional (!isPy3k) mock
|
++ lib.optional (!isPy3k) mock
|
||||||
++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ]
|
++ lib.optionals (pythonOlder "3.4") [ backports_weakref enum34 ];
|
||||||
++ lib.optional (pythonOlder "3.6") tensorflow-tensorboard;
|
|
||||||
|
|
||||||
# tensorflow 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.
|
|
||||||
installFlags = lib.optional isPy36 "--no-dependencies";
|
|
||||||
|
|
||||||
|
|
||||||
# Upstream has a pip hack that results in bin/tensorboard being in both tensorflow
|
# Upstream has a pip hack that results in bin/tensorboard being in both tensorflow
|
||||||
# and the propageted input tensorflow-tensorboard which causes environment collisions.
|
# and the propageted input tensorflow-tensorboard which causes environment collisions.
|
||||||
#
|
# another possibility would be to have tensorboard only in the buildInputs
|
||||||
# https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79
|
# https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm $out/bin/tensorboard
|
rm $out/bin/tensorboard
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
installFlags = "--no-dependencies"; # tensorflow wants setuptools 39, can't allow that.
|
||||||
# Note that we need to run *after* the fixup phase because the
|
# Note that we need to run *after* the fixup phase because the
|
||||||
# libraries are loaded at runtime. If we run in preFixup then
|
# libraries are loaded at runtime. If we run in preFixup then
|
||||||
# patchelf --shrink-rpath will remove the cuda libraries.
|
# patchelf --shrink-rpath will remove the cuda libraries.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version=1.7.1
|
version=1.9.0
|
||||||
hashfile=tf${version}-hashes.nix
|
hashfile=tf${version}-hashes.nix
|
||||||
rm -f $hashfile
|
rm -f $hashfile
|
||||||
echo "{" >> $hashfile
|
echo "{" >> $hashfile
|
||||||
@ -27,3 +27,4 @@ for sys in "linux" "mac"; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
echo "}" >> $hashfile
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
linux_py_27_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp27-none-linux_x86_64.whl";
|
||||||
|
sha256 = "1dvmajv5ddgzrazdnxpfhk9dkj0lfiviw4jmvk00d4q5v68z6ihg";
|
||||||
|
};
|
||||||
|
linux_py_35_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp35-cp35m-linux_x86_64.whl";
|
||||||
|
sha256 = "07ilrxbhz9p3xwqhl2p8c40y1gsq68x10f34pzayrvcg2i52bvpv";
|
||||||
|
};
|
||||||
|
linux_py_36_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl";
|
||||||
|
sha256 = "0x2l64ab7i8nr0dzvsryblhn869qyjb85xkhy69nwahqswb68hxl";
|
||||||
|
};
|
||||||
|
linux_py_27_gpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp27-none-linux_x86_64.whl";
|
||||||
|
sha256 = "0q7i82jgy0mzn2mw8i1z0pvv7ssi6m7zqkkjg2i4zxpk8djg8k6z";
|
||||||
|
};
|
||||||
|
linux_py_35_gpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp35-cp35m-linux_x86_64.whl";
|
||||||
|
sha256 = "0nhq2s8fanm095x1sc9h40dvqcv9bc2aj47crv3c2sajbj7dn43g";
|
||||||
|
};
|
||||||
|
linux_py_36_gpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.9.0-cp36-cp36m-linux_x86_64.whl";
|
||||||
|
sha256 = "1m4b9cd8ghghqxaqrlzq7j9499ddidgr78bx0c20pgyrzg38jiz1";
|
||||||
|
};
|
||||||
|
mac_py_2_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py2-none-any.whl";
|
||||||
|
sha256 = "1djj0xahzrmxhfc6kyjx1lkyfh7jhq3ix0gz9j3iq4smb3ca9z01";
|
||||||
|
};
|
||||||
|
mac_py_3_cpu = {
|
||||||
|
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl";
|
||||||
|
sha256 = "0igffy7r0d8mhkn4pybp19jmc25alfpfl4k4fxh2s3rvgii8gk22";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user