Merge pull request #304646 from GaetanLepage/kserve

python311Packages.kserve: init at 0.12.1
This commit is contained in:
Someone 2024-04-25 09:04:16 +00:00 committed by GitHub
commit 770458daf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 228 additions and 0 deletions

View File

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, deprecation
, flask
, pydantic
, pytestCheckHook
, requests
, sanic
, sanic-testing
}:
buildPythonPackage rec {
pname = "cloudevents";
version = "1.10.1";
pyproject = true;
src = fetchFromGitHub {
owner = "cloudevents";
repo = "sdk-python";
rev = "refs/tags/${version}";
hash = "sha256-YIvEAofWmnUblRd4jV3Zi3VdfocOnD05CMVm/abngyg=";
};
build-system = [
setuptools
wheel
];
pythonImportsCheck = [ "cloudevents" ];
nativeCheckInputs = [
deprecation
flask
pydantic
pytestCheckHook
requests
sanic
sanic-testing
];
disabledTestPaths = [
"samples/http-image-cloudevents/image_sample_test.py"
];
meta = with lib; {
description = "Python SDK for CloudEvents";
homepage = "https://github.com/cloudevents/sdk-python";
changelog = "https://github.com/cloudevents/sdk-python/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ GaetanLepage ];
};
}

View File

@ -0,0 +1,119 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, deprecation
, poetry-core
, pythonRelaxDepsHook
, async-timeout
, cloudevents
, fastapi
, grpcio
, httpx
, kubernetes
, numpy
, orjson
, pandas
, prometheus-client
, protobuf
, psutil
, python-dateutil
, ray
, six
, tabulate
, timing-asgi
, uvicorn
, avro
, azure-storage-blob
, azure-storage-file-share
, boto3
, botocore
, google-cloud-storage
, pytestCheckHook
, tomlkit
}:
buildPythonPackage rec {
pname = "kserve";
version = "0.12.1";
pyproject = true;
src = fetchFromGitHub {
owner = "kserve";
repo = "kserve";
rev = "refs/tags/v${version}";
hash = "sha256-gKJkG8zJY1sGGpI27YZ/QnEPU8J7KHva3nI+JCglQaQ=";
};
sourceRoot = "${src.name}/python/kserve";
build-system = [
deprecation
poetry-core
];
nativeBuildInputs = [
pythonRelaxDepsHook
];
dependencies = [
async-timeout
cloudevents
fastapi
grpcio
httpx
kubernetes
numpy
orjson
pandas
prometheus-client
protobuf
psutil
python-dateutil
ray
six
tabulate
timing-asgi
uvicorn
] ++ ray.passthru.optional-dependencies.serve-deps;
pythonRelaxDeps = [
"fastapi"
"httpx"
"prometheus-client"
"protobuf"
"ray"
"uvicorn"
];
pythonImportsCheck = [ "kserve" ];
nativeCheckInputs = [
avro
azure-storage-blob
azure-storage-file-share
boto3
botocore
google-cloud-storage
pytestCheckHook
tomlkit
];
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"
];
meta = with lib; {
description = "Standardized Serverless ML Inference Platform on Kubernetes";
homepage = "https://github.com/kserve/kserve/tree/master/python/kserve";
license = licenses.asl20;
maintainers = with maintainers; [ GaetanLepage ];
};
}

View File

@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, asynctest
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "timing-asgi";
version = "0.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "steinnes";
repo = "timing-asgi";
rev = "refs/tags/v${version}";
hash = "sha256-oEDesmy9t2m51Zd6Zg87qoYbfbDnejfrbjyBkZ3hF58=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail poetry.masonry.api poetry.core.masonry.api \
--replace-fail "poetry>=" "poetry-core>="
'';
build-system = [
poetry-core
];
pythonImportsCheck = [ "timing_asgi" ];
# Tests rely on asynctest which is not supported by python 3.11
doCheck = false;
nativeCheckInputs = [
# asynctest-0.13.0 not supported for interpreter python3.11
# asynctest
pytestCheckHook
];
meta = with lib; {
description = "ASGI middleware to emit timing metrics with something like statsd";
homepage = "https://pypi.org/project/timing-asgi";
license = licenses.mit;
maintainers = with maintainers; [ GaetanLepage ];
};
}

View File

@ -2264,6 +2264,8 @@ self: super: with self; {
clldutils = callPackage ../development/python-modules/clldutils { };
cloudevents = callPackage ../development/python-modules/cloudevents { };
cloudflare = callPackage ../development/python-modules/cloudflare { };
cloudpathlib = callPackage ../development/python-modules/cloudpathlib { };
@ -6407,6 +6409,8 @@ self: super: with self; {
krfzf-py = callPackage ../development/python-modules/krfzf-py { };
kserve = callPackage ../development/python-modules/kserve { };
kubernetes = callPackage ../development/python-modules/kubernetes { };
kurbopy = callPackage ../development/python-modules/kurbopy { };
@ -15057,6 +15061,8 @@ self: super: with self; {
timezonefinder = callPackage ../development/python-modules/timezonefinder { };
timing-asgi = callPackage ../development/python-modules/timing-asgi { };
timm = callPackage ../development/python-modules/timm { };
tiny-cuda-nn = toPythonModule (pkgs.tiny-cuda-nn.override {