-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #304646 from GaetanLepage/kserve
python311Packages.kserve: init at 0.12.1
- Loading branch information
Showing
4 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters