From 4b8720f332de98d17b9ceedccbf337b4bce15a1d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 8 Mar 2024 18:17:23 +0100 Subject: [PATCH] openvino: 2023.3.0 -> 2024.0.0 https://github.com/openvinotoolkit/openvino/releases/tag/2024.0.0 --- .../libraries/openvino/default.nix | 50 ++++++------------- .../python-modules/openvino/default.nix | 1 - pkgs/top-level/all-packages.nix | 4 +- pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 18 insertions(+), 39 deletions(-) diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix index 186e1048823a..a4ce0fe60c1e 100644 --- a/pkgs/development/libraries/openvino/default.nix +++ b/pkgs/development/libraries/openvino/default.nix @@ -1,7 +1,6 @@ { lib , gcc12Stdenv , fetchFromGitHub -, fetchpatch2 , fetchurl , cudaSupport ? opencv.cudaSupport or false @@ -11,10 +10,10 @@ , cmake , git , libarchive +, patchelf , pkg-config -, python +, python3Packages , shellcheck -, sphinx # runtime , flatbuffers @@ -36,40 +35,34 @@ let stdenv = gcc12Stdenv; - # See GNA_VERSION in cmake/dependencies.cmake - gna_version = "03.05.00.2116"; - gna = fetchurl { - url = "https://storage.openvinotoolkit.org/dependencies/gna/gna_${gna_version}.zip"; - hash = "sha256-lgNQVncCvaFydqxMBg11JPt8587XhQBL2GHIH/K/4sU="; - }; - tbbbind_version = "2_5"; tbbbind = fetchurl { url = "https://storage.openvinotoolkit.org/dependencies/thirdparty/linux/tbbbind_${tbbbind_version}_static_lin_v4.tgz"; hash = "sha256-Tr8wJGUweV8Gb7lhbmcHxrF756ZdKdNRi1eKdp3VTuo="; }; + + python = python3Packages.python.withPackages (ps: with ps; [ + cython + pybind11 + setuptools + sphinx + wheel + ]); + in stdenv.mkDerivation rec { pname = "openvino"; - version = "2023.3.0"; + version = "2024.0.0"; src = fetchFromGitHub { owner = "openvinotoolkit"; repo = "openvino"; rev = "refs/tags/${version}"; fetchSubmodules = true; - hash = "sha256-dXlQhar5gz+1iLmDYXUY0jZKh4rJ+khRpoZQphJXfcU="; + hash = "sha256-Xsrmc1EynkjgPgiQ+ESyVJRJT9Afqyob0/uH+Is4TYA="; }; - patches = [ - (fetchpatch2 { - name = "enable-js-toggle.patch"; - url = "https://github.com/openvinotoolkit/openvino/commit/0a8f1383826d949c497fe3d05fef9ad2b662fa7e.patch"; - hash = "sha256-mQYunouPo3tRlD5Yp4EUth324ccNnVX8zmjPHvJBYKw="; - }) - ]; - outputs = [ "out" "python" @@ -81,26 +74,15 @@ stdenv.mkDerivation rec { cmake git libarchive + patchelf pkg-config - (python.withPackages (ps: with ps; [ - cython - pybind11 - setuptools - ])) + python shellcheck - sphinx ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ]; postPatch = '' - mkdir -p temp/gna_${gna_version} - pushd temp/ - bsdtar -xf ${gna} - autoPatchelf gna_${gna_version} - echo "${gna.url}" > gna_${gna_version}/ie_dependency.info - popd - mkdir -p temp/tbbbind_${tbbbind_version} pushd temp/tbbbind_${tbbbind_version} bsdtar -xf ${tbbbind} @@ -116,6 +98,7 @@ stdenv.mkDerivation rec { "-DCMAKE_PREFIX_PATH:PATH=${placeholder "out"}" "-DOpenCV_DIR=${opencv}/lib/cmake/opencv4/" "-DProtobuf_LIBRARIES=${protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DPython_EXECUTABLE=${python.interpreter}" (cmakeBool "CMAKE_VERBOSE_MAKEFILE" true) (cmakeBool "NCC_SYLE" false) @@ -126,7 +109,6 @@ stdenv.mkDerivation rec { # features (cmakeBool "ENABLE_INTEL_CPU" true) - (cmakeBool "ENABLE_INTEL_GNA" true) (cmakeBool "ENABLE_JS" false) (cmakeBool "ENABLE_LTO" true) (cmakeBool "ENABLE_ONEDNN_FOR_GPU" false) diff --git a/pkgs/development/python-modules/openvino/default.nix b/pkgs/development/python-modules/openvino/default.nix index 20f47eb666ef..660e6c41c014 100644 --- a/pkgs/development/python-modules/openvino/default.nix +++ b/pkgs/development/python-modules/openvino/default.nix @@ -26,7 +26,6 @@ buildPythonPackage { ''; pythonImportsCheck = [ - "ngraph" "openvino" "openvino.runtime" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92b34d44c36c..83d0e1e32abb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -41041,9 +41041,7 @@ with pkgs; openrisk = callPackage ../tools/security/openrisk { }; - openvino = callPackage ../development/libraries/openvino { - python = python3; - }; + openvino = callPackage ../development/libraries/openvino { }; phonetisaurus = callPackage ../development/libraries/phonetisaurus { # https://github.com/AdolfVonKleist/Phonetisaurus/issues/70 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 534d9b49abc4..f08e60bf6b88 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9060,7 +9060,7 @@ self: super: with self; { openvino = callPackage ../development/python-modules/openvino { openvino-native = pkgs.openvino.override { - inherit python; + python3Packages = self; }; };