From 09d8f40cc3ea3c007e25256d9c75271410c5a55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 7 Apr 2023 17:47:47 +0200 Subject: [PATCH] tensorflow-bin: 2.11.0 -> 2.12.0 --- .../python-modules/tensorflow/bin.nix | 31 +++--------- .../tensorflow/binary-hashes.nix | 50 +++++++------------ .../python-modules/tensorflow/prefetcher.sh | 17 +++---- 3 files changed, 32 insertions(+), 66 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 4b3d3d0ec6c4e29..a2e7b2d21e8acc2 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -16,13 +16,13 @@ , mock , scipy , wheel +, jax , opt-einsum , backports_weakref , tensorflow-estimator-bin , tensorboard , cudaSupport ? false , cudaPackages ? {} -, patchelfUnstable , zlib , python , keras-applications @@ -67,6 +67,7 @@ in buildPythonPackage { protobuf numpy scipy + jax termcolor grpcio six @@ -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 @@ -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" \ @@ -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 @@ -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" - ]; }; } diff --git a/pkgs/development/python-modules/tensorflow/binary-hashes.nix b/pkgs/development/python-modules/tensorflow/binary-hashes.nix index a59a31b57442ec3..e2242ef76d988aa 100644 --- a/pkgs/development/python-modules/tensorflow/binary-hashes.nix +++ b/pkgs/development/python-modules/tensorflow/binary-hashes.nix @@ -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"; }; } diff --git a/pkgs/development/python-modules/tensorflow/prefetcher.sh b/pkgs/development/python-modules/tensorflow/prefetcher.sh index a4a7c5dfa57c1d2..8cdc11e11fd9242 100755 --- a/pkgs/development/python-modules/tensorflow/prefetcher.sh +++ b/pkgs/development/python-modules/tensorflow/prefetcher.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -version="2.11.0" +version="2.12.0" bucket="https://storage.googleapis.com/tensorflow" @@ -8,18 +8,15 @@ bucket="https://storage.googleapis.com/tensorflow" # 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