From 514fd961830caca42abfe72da85636051d2f1ae3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 3 Nov 2025 10:00:47 +0000 Subject: [PATCH 1/3] python3Packages.kserve-storage: init at 0.16.0 --- .../python-modules/kserve-storage/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/kserve-storage/default.nix diff --git a/pkgs/development/python-modules/kserve-storage/default.nix b/pkgs/development/python-modules/kserve-storage/default.nix new file mode 100644 index 000000000000..b56be1c1b275 --- /dev/null +++ b/pkgs/development/python-modules/kserve-storage/default.nix @@ -0,0 +1,67 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + + # build-system + setuptools, + + # dependencies + azure-identity, + azure-storage-blob, + azure-storage-file-share, + boto3, + google-cloud-storage, + huggingface-hub, + requests, + + # tests + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "kserve-storage"; + version = "0.16.0"; + pyproject = true; + + src = fetchPypi { + pname = "kserve_storage"; + inherit version; + hash = "sha256-xgLnWegsPF18RLxwxt0dfnrZwsX7AK3b8AdT594Bac4="; + }; + + build-system = [ + setuptools + ]; + + pythonRelaxDeps = [ + "google-cloud-storage" + ]; + dependencies = [ + azure-identity + azure-storage-blob + azure-storage-file-share + boto3 + google-cloud-storage + huggingface-hub + requests + ]; + + pythonImportsCheck = [ "kserve_storage" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # RuntimeError: Failed to fetch model. No model found in file:///tmp. + "test_local_path_with_out_dir_exist" + ]; + + meta = { + description = "KServe Storage Handler. This module is responsible to download the models from the provided source"; + homepage = "https://pypi.org/project/kserve-storage"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ab0840b733e0..9c957caf06f6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7964,6 +7964,8 @@ self: super: with self; { kserve = callPackage ../development/python-modules/kserve { }; + kserve-storage = callPackage ../development/python-modules/kserve-storage { }; + kubernetes = callPackage ../development/python-modules/kubernetes { }; kubernetes-asyncio = callPackage ../development/python-modules/kubernetes-asyncio { }; From f8b42dea3451017289346cbd0b25fcc2a7c07174 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 3 Nov 2025 10:12:08 +0000 Subject: [PATCH 2/3] python3Packages.cloudevents: add missing dependency deprecation --- pkgs/development/python-modules/cloudevents/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cloudevents/default.nix b/pkgs/development/python-modules/cloudevents/default.nix index 5324f3ab5ee6..3b5b966475b1 100644 --- a/pkgs/development/python-modules/cloudevents/default.nix +++ b/pkgs/development/python-modules/cloudevents/default.nix @@ -28,10 +28,13 @@ buildPythonPackage rec { setuptools ]; + dependencies = [ + deprecation + ]; + pythonImportsCheck = [ "cloudevents" ]; nativeCheckInputs = [ - deprecation flask pydantic pytestCheckHook From b3f102e52d16a602f91e3eb6d6abbcdce6861336 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 3 Nov 2025 09:35:37 +0000 Subject: [PATCH 3/3] python3Packages.kserve: 0.15.2 -> 0.16.0 Diff: https://github.com/kserve/kserve/compare/v0.15.2...v0.16.0 Changelog: https://github.com/kserve/kserve/releases/tag/v0.16.0 --- .../python-modules/kserve/default.nix | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/kserve/default.nix b/pkgs/development/python-modules/kserve/default.nix index f73275866a44..c547a18e5cff 100644 --- a/pkgs/development/python-modules/kserve/default.nix +++ b/pkgs/development/python-modules/kserve/default.nix @@ -5,35 +5,21 @@ fetchFromGitHub, # build-system - deprecation, - poetry-core, + setuptools, # dependencies cloudevents, fastapi, grpc-interceptor, grpcio, + grpcio-tools, httpx, kubernetes, numpy, orjson, pandas, - uvicorn, - - # optional-dependencies - azure-identity, - azure-storage-blob, - azure-storage-file-share, - boto3, - google-cloud-storage, - huggingface-hub, - asgi-logger, - ray, - vllm, - prometheus-client, protobuf, - requests, psutil, pydantic, python-dateutil, @@ -41,11 +27,24 @@ six, tabulate, timing-asgi, + uvicorn, + + # optional-dependencies + # storage + kserve-storage, + # logging + asgi-logger, + # ray + ray, + # llm + vllm, # tests avro, grpcio-testing, + jinja2, pytest-asyncio, + pytest-cov-stub, pytest-httpx, pytest-xdist, pytestCheckHook, @@ -54,14 +53,14 @@ buildPythonPackage rec { pname = "kserve"; - version = "0.15.2"; + version = "0.16.0"; pyproject = true; src = fetchFromGitHub { owner = "kserve"; repo = "kserve"; tag = "v${version}"; - hash = "sha256-NklR2Aoa5UdWkqNOfX+xl3R158JDSQtStXv9DkklOwM="; + hash = "sha256-f6ILZMLxfckEpy7wSgCqUx89JWSnn0DbQiqRSHcQHms="; }; sourceRoot = "${src.name}/python/kserve"; @@ -77,8 +76,7 @@ buildPythonPackage rec { ]; build-system = [ - deprecation - poetry-core + setuptools ]; dependencies = [ @@ -86,6 +84,7 @@ buildPythonPackage rec { fastapi grpc-interceptor grpcio + grpcio-tools httpx kubernetes numpy @@ -101,21 +100,20 @@ buildPythonPackage rec { tabulate timing-asgi uvicorn - ]; + ] + ++ uvicorn.optional-dependencies.standard; optional-dependencies = { storage = [ - azure-identity - azure-storage-blob - azure-storage-file-share - boto3 - huggingface-hub - google-cloud-storage - requests + kserve-storage + ]; + logging = [ + asgi-logger + ]; + ray = [ + ray ] - ++ huggingface-hub.optional-dependencies.hf_transfer; - logging = [ asgi-logger ]; - ray = [ ray ]; + ++ ray.optional-dependencies.serve; llm = [ vllm ]; @@ -124,7 +122,9 @@ buildPythonPackage rec { nativeCheckInputs = [ avro grpcio-testing + jinja2 pytest-asyncio + pytest-cov-stub pytest-httpx pytest-xdist pytestCheckHook