Skip to content

Commit

Permalink
python312Packages.kserve: add optional-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored and GaetanLepage committed Sep 28, 2024
1 parent 775816a commit e95f5b7
Showing 1 changed file with 34 additions and 22 deletions.
56 changes: 34 additions & 22 deletions pkgs/development/python-modules/kserve/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@

# dependencies
async-timeout,
asgi-logger,
cloudevents,
fastapi,
grpcio,
httpx,
azure-identity,
kubernetes,
numpy,
orjson,
pandas,
prometheus-client,
protobuf,
requests,
psutil,
azure-storage-blob,
azure-storage-file-share,
boto3,
google-cloud-storage,
pydantic,
python-dateutil,
pyyaml,
Expand All @@ -32,11 +39,6 @@

# checks
avro,
azure-storage-blob,
azure-storage-file-share,
boto3,
botocore,
google-cloud-storage,
grpcio-testing,
pytest-asyncio,
pytestCheckHook,
Expand All @@ -59,6 +61,16 @@ buildPythonPackage rec {

sourceRoot = "${src.name}/python/kserve";

pythonRelaxDeps = [
"fastapi"
"httpx"
"prometheus-client"
"protobuf"
"ray"
"uvicorn"
"psutil"
];

build-system = [
deprecation
poetry-core
Expand Down Expand Up @@ -87,30 +99,28 @@ buildPythonPackage rec {
uvicorn
] ++ ray.optional-dependencies.serve-deps;

pythonRelaxDeps = [
"fastapi"
"httpx"
"prometheus-client"
"protobuf"
"ray"
"uvicorn"
"psutil"
];

pythonImportsCheck = [ "kserve" ];
optional-dependencies = {
storage = [
azure-identity
azure-storage-blob
azure-storage-file-share
boto3
google-cloud-storage
requests
];
logging = [ asgi-logger ];
ray = [ ray ];
};

nativeCheckInputs = [
avro
azure-storage-blob
azure-storage-file-share
boto3
botocore
google-cloud-storage
grpcio-testing
pytest-asyncio
pytestCheckHook
tomlkit
];
] ++ lib.flatten (builtins.attrValues optional-dependencies);

pythonImportsCheck = [ "kserve" ];

disabledTestPaths = [
# Looks for a config file at the root of the repository
Expand All @@ -122,6 +132,8 @@ buildPythonPackage rec {
"test_health_handler"
"test_infer"
"test_infer_v2"
# Assertion error due to HTTP response code
"test_unload"
];

meta = {
Expand Down

0 comments on commit e95f5b7

Please sign in to comment.