2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-06-20 14:57:18 +00:00
|
|
|
pythonOlder,
|
2024-06-05 15:53:02 +00:00
|
|
|
fetchFromGitHub,
|
2024-07-31 10:19:44 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-06-05 15:53:02 +00:00
|
|
|
deprecation,
|
|
|
|
poetry-core,
|
2024-07-31 10:19:44 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
async-timeout,
|
2024-10-04 16:56:33 +00:00
|
|
|
asgi-logger,
|
2024-06-05 15:53:02 +00:00
|
|
|
cloudevents,
|
|
|
|
fastapi,
|
|
|
|
grpcio,
|
|
|
|
httpx,
|
2024-10-04 16:56:33 +00:00
|
|
|
azure-identity,
|
2024-06-05 15:53:02 +00:00
|
|
|
kubernetes,
|
|
|
|
numpy,
|
|
|
|
orjson,
|
|
|
|
pandas,
|
|
|
|
prometheus-client,
|
|
|
|
protobuf,
|
2024-10-04 16:56:33 +00:00
|
|
|
requests,
|
2024-06-05 15:53:02 +00:00
|
|
|
psutil,
|
2024-10-04 16:56:33 +00:00
|
|
|
azure-storage-blob,
|
|
|
|
azure-storage-file-share,
|
|
|
|
boto3,
|
|
|
|
google-cloud-storage,
|
2024-07-31 10:19:44 +00:00
|
|
|
pydantic,
|
2024-06-05 15:53:02 +00:00
|
|
|
python-dateutil,
|
2024-07-31 10:19:44 +00:00
|
|
|
pyyaml,
|
2024-06-05 15:53:02 +00:00
|
|
|
ray,
|
|
|
|
six,
|
|
|
|
tabulate,
|
|
|
|
timing-asgi,
|
|
|
|
uvicorn,
|
2024-07-31 10:19:44 +00:00
|
|
|
|
|
|
|
# checks
|
2024-06-05 15:53:02 +00:00
|
|
|
avro,
|
2024-06-20 14:57:18 +00:00
|
|
|
grpcio-testing,
|
2024-07-31 10:19:44 +00:00
|
|
|
pytest-asyncio,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
tomlkit,
|
2024-05-15 15:35:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kserve";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "0.13.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kserve";
|
|
|
|
repo = "kserve";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-wGS001PK+k21oCOaQCiAtytTDjfe0aiTVJ9spyOucYA=";
|
2024-05-15 15:35:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "${src.name}/python/kserve";
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"fastapi"
|
|
|
|
"httpx"
|
|
|
|
"prometheus-client"
|
|
|
|
"protobuf"
|
|
|
|
"ray"
|
|
|
|
"uvicorn"
|
|
|
|
"psutil"
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
deprecation
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
async-timeout
|
|
|
|
cloudevents
|
|
|
|
fastapi
|
|
|
|
grpcio
|
|
|
|
httpx
|
|
|
|
kubernetes
|
|
|
|
numpy
|
|
|
|
orjson
|
|
|
|
pandas
|
|
|
|
prometheus-client
|
|
|
|
protobuf
|
|
|
|
psutil
|
2024-07-31 10:19:44 +00:00
|
|
|
pydantic
|
2024-05-15 15:35:15 +00:00
|
|
|
python-dateutil
|
2024-07-31 10:19:44 +00:00
|
|
|
pyyaml
|
2024-05-15 15:35:15 +00:00
|
|
|
ray
|
|
|
|
six
|
|
|
|
tabulate
|
|
|
|
timing-asgi
|
|
|
|
uvicorn
|
2024-09-19 14:19:46 +00:00
|
|
|
] ++ ray.optional-dependencies.serve-deps;
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
storage = [
|
|
|
|
azure-identity
|
|
|
|
azure-storage-blob
|
|
|
|
azure-storage-file-share
|
|
|
|
boto3
|
|
|
|
google-cloud-storage
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
logging = [ asgi-logger ];
|
|
|
|
ray = [ ray ];
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
avro
|
2024-06-20 14:57:18 +00:00
|
|
|
grpcio-testing
|
2024-07-31 10:19:44 +00:00
|
|
|
pytest-asyncio
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
tomlkit
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "kserve" ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Looks for a config file at the root of the repository
|
|
|
|
"test/test_inference_service_client.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Require network access
|
|
|
|
"test_health_handler"
|
|
|
|
"test_infer"
|
|
|
|
"test_infer_v2"
|
2024-10-04 16:56:33 +00:00
|
|
|
# Assertion error due to HTTP response code
|
|
|
|
"test_unload"
|
2024-05-15 15:35:15 +00:00
|
|
|
];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2024-05-15 15:35:15 +00:00
|
|
|
description = "Standardized Serverless ML Inference Platform on Kubernetes";
|
|
|
|
homepage = "https://github.com/kserve/kserve/tree/master/python/kserve";
|
2024-06-20 14:57:18 +00:00
|
|
|
changelog = "https://github.com/kserve/kserve/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
2024-05-15 15:35:15 +00:00
|
|
|
};
|
|
|
|
}
|