Skip to content

Commit

Permalink
tensorflow-bin: 2.11.0 -> 2.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 7, 2023
1 parent cd07e02 commit 09d8f40
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 66 deletions.
31 changes: 6 additions & 25 deletions pkgs/development/python-modules/tensorflow/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
, mock
, scipy
, wheel
, jax
, opt-einsum
, backports_weakref
, tensorflow-estimator-bin
, tensorboard
, cudaSupport ? false
, cudaPackages ? {}
, patchelfUnstable
, zlib
, python
, keras-applications
Expand Down Expand Up @@ -67,6 +67,7 @@ in buildPythonPackage {
protobuf
numpy
scipy
jax
termcolor
grpcio
six
Expand All @@ -84,8 +85,7 @@ in buildPythonPackage {
] ++ lib.optional (!isPy3k) mock
++ lib.optionals (pythonOlder "3.4") [ backports_weakref ];

# remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default
nativeBuildInputs = [ wheel ] ++ lib.optionals cudaSupport [ addOpenGLRunpath patchelfUnstable ];
nativeBuildInputs = [ wheel ] ++ lib.optionals cudaSupport [ addOpenGLRunpath ];

preConfigure = ''
unset SOURCE_DATE_EPOCH
Expand All @@ -104,6 +104,7 @@ in buildPythonPackage {
# - Relax flatbuffers, gast, protobuf, tensorboard, and tensorflow-estimator version requirements that don't match what we have packaged
# - The purpose of python3Packages.libclang is not clear at the moment and we don't have it packaged yet
# - keras and tensorlow-io-gcs-filesystem will be considered as optional for now.
# - numpy was pinned to fix some internal tests: https://github.com/tensorflow/tensorflow/issues/60216
sed -i *.dist-info/METADATA \
-e "/Requires-Dist: flatbuffers/d" \
-e "/Requires-Dist: gast/d" \
Expand All @@ -112,7 +113,8 @@ in buildPythonPackage {
-e "/Requires-Dist: protobuf/d" \
-e "/Requires-Dist: tensorboard/d" \
-e "/Requires-Dist: tensorflow-estimator/d" \
-e "/Requires-Dist: tensorflow-io-gcs-filesystem/d"
-e "/Requires-Dist: tensorflow-io-gcs-filesystem/d" \
-e "s/Requires-Dist: numpy (.*)/Requires-Dist: numpy/"
)
wheel pack ./unpacked/tensorflow*
mv *.whl $orig_name # avoid changes to the _os_arch.whl suffix
Expand Down Expand Up @@ -201,26 +203,5 @@ in buildPythonPackage {
license = licenses.asl20;
maintainers = with maintainers; [ jyp abbradar cdepillabout ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
knownVulnerabilities = optionals (versionOlder packages.version "2.12.0") [
"CVE-2023-27579"
"CVE-2023-25801"
"CVE-2023-25676"
"CVE-2023-25675"
"CVE-2023-25674"
"CVE-2023-25673"
"CVE-2023-25671"
"CVE-2023-25670"
"CVE-2023-25669"
"CVE-2023-25668"
"CVE-2023-25667"
"CVE-2023-25665"
"CVE-2023-25666"
"CVE-2023-25664"
"CVE-2023-25663"
"CVE-2023-25662"
"CVE-2023-25660"
"CVE-2023-25659"
"CVE-2023-25658"
];
};
}
50 changes: 19 additions & 31 deletions pkgs/development/python-modules/tensorflow/binary-hashes.nix
Original file line number Diff line number Diff line change
@@ -1,51 +1,39 @@
{
version = "2.11.0";
linux_py_37_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "0m360pj7ix57d30s9inq9g5cbv7jrgnk2ryygj8irfw569rrzk7x";
};
version = "2.12.0";
linux_py_38_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1kx4rj15fnbmznpyjjbkw5mf0b03gw97h7ijlqf1kcdjzmbm24la";
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1lqdb3n8dp2f1vignddfqfbbghidkbrq9g78fqkjir8g318zf1m4";
};
linux_py_39_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1isvyiwrhis8i2xjx5mmsrxv2i7fl0hg1jaa1pgw70c6sz5vqm0r";
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1k595l4gpmar9rg4kim2i41fv25i8p018fdmgxcb5v6836d5ns2m";
};
linux_py_310_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1ni7yrk33xdh6zpy840y3hbidmfgj9dxp690yxrjwarr3694465k";
};
linux_py_37_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "14r2sa25gmpda6kysv7dbbrzmaxb47jq2fpy9dfcfbiwsrzszwhi";
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1mhq429j9v82jwyqk6dcaz0sh57n0kyf2bfjrjz13xjblssij6rn";
};
linux_py_38_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1z8g3j1a8bzpfl3cwf74wal9npfyzr89l14wrrjmd311w9c06z25";
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "009wyvzdlzghb39mmrv36fvjrrrbllyadny9jzb7ixzry4r07193";
};
linux_py_39_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1nfhw5fwkvwyvcap41756avrg4c8xm0xrdgj8spqfjvamc3chcqp";
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "0l1cwsfw91vfgx8xqwz7cdphj1dy6ppfifm7f7f0n0i6rda6l382";
};
linux_py_310_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "1vckr15ys8cks8pj9yld4zyhm8w7bjnc8yq6q1g3145fl99ygac1";
};
mac_py_37_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp37-cp37m-macosx_10_14_x86_64.whl";
sha256 = "12lk1wx5dqklc210xya3sbm3gl4163454k13d2nnk94z2iwi376j";
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "0dl3nvr4pk4zknx484qd2mqdkjkms6s4alqrxqkqv2hqa4l9sz9m";
};
mac_py_38_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp38-cp38-macosx_10_14_x86_64.whl";
sha256 = "1j4y6vhlpz27xllwr9n0gswmwld221ws8sl5wdn56hi347r2jv85";
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp38-cp38-macosx_10_15_x86_64.whl";
sha256 = "0jkxd9ccbq2czn16w3his6k1hxx0nhkrb56bkrskwzss9is4w6d7";
};
mac_py_39_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp39-cp39-macosx_10_14_x86_64.whl";
sha256 = "11ylm1a2mxf9lz958p39q2pag4mqss6zsfxagk3ybwj1lsy2bkyr";
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp39-cp39-macosx_10_15_x86_64.whl";
sha256 = "0n7rsrxlkn143y80579bm8wwsabg2a9x6sx1h7ksw3s2x4sjdz22";
};
mac_py_310_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp310-cp310-macosx_10_14_x86_64.whl";
sha256 = "1l6jnmi14sbxbrpwqw3bq6mv1mn5rhbkx9j3dxfnhh10dkn9y13c";
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp310-cp310-macosx_10_15_x86_64.whl";
sha256 = "18fj2jxl8b69jrzjkixhyyrml8qjwcid76y15ggzc5ksrkgw0jmy";
};
}
17 changes: 7 additions & 10 deletions pkgs/development/python-modules/tensorflow/prefetcher.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
#!/usr/bin/env bash

version="2.11.0"
version="2.12.0"

bucket="https://storage.googleapis.com/tensorflow"

# List of binary wheels for Tensorflow. The most recent versions can be found
# on the following page:
# https://www.tensorflow.org/install/pip?lang=python3#package-location
url_and_key_list=(
"linux_py_37_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_38_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_39_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_310_cpu $bucket/linux/cpu/tensorflow_cpu-${version}-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_37_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_38_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_39_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_310_gpu $bucket/linux/gpu/tensorflow_gpu-${version}-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"mac_py_37_cpu $bucket/mac/cpu/tensorflow-${version}-cp37-cp37m-macosx_10_14_x86_64.whl"
"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_14_x86_64.whl"
"mac_py_39_cpu $bucket/mac/cpu/tensorflow-${version}-cp39-cp39-macosx_10_14_x86_64.whl"
"mac_py_310_cpu $bucket/mac/cpu/tensorflow-${version}-cp310-cp310-macosx_10_14_x86_64.whl"
"linux_py_38_gpu $bucket/linux/gpu/tensorflow-${version}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_39_gpu $bucket/linux/gpu/tensorflow-${version}-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"linux_py_310_gpu $bucket/linux/gpu/tensorflow-${version}-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
"mac_py_38_cpu $bucket/mac/cpu/tensorflow-${version}-cp38-cp38-macosx_10_15_x86_64.whl"
"mac_py_39_cpu $bucket/mac/cpu/tensorflow-${version}-cp39-cp39-macosx_10_15_x86_64.whl"
"mac_py_310_cpu $bucket/mac/cpu/tensorflow-${version}-cp310-cp310-macosx_10_15_x86_64.whl"
)

hashfile=binary-hashes.nix
Expand Down

0 comments on commit 09d8f40

Please sign in to comment.