Commit e95f5b75 authored by Fabian Affolter's avatar Fabian Affolter Committed by Gaétan Lepage
Browse files

python312Packages.kserve: add optional-dependencies

parent 775816a0
Loading
Loading
Loading
Loading
+34 −22
Original line number Diff line number Diff line
@@ -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,
@@ -32,11 +39,6 @@

  # checks
  avro,
  azure-storage-blob,
  azure-storage-file-share,
  boto3,
  botocore,
  google-cloud-storage,
  grpcio-testing,
  pytest-asyncio,
  pytestCheckHook,
@@ -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
@@ -87,30 +99,28 @@ buildPythonPackage rec {
    uvicorn
  ] ++ ray.optional-dependencies.serve-deps;

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

  pythonImportsCheck = [ "kserve" ];

  nativeCheckInputs = [
    avro
  optional-dependencies = {
    storage = [
      azure-identity
      azure-storage-blob
      azure-storage-file-share
      boto3
    botocore
      google-cloud-storage
      requests
    ];
    logging = [ asgi-logger ];
    ray = [ ray ];
  };

  nativeCheckInputs = [
    avro
    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
@@ -122,6 +132,8 @@ buildPythonPackage rec {
    "test_health_handler"
    "test_infer"
    "test_infer_v2"
    # Assertion error due to HTTP response code
    "test_unload"
  ];

  meta = {