Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 deprecation, 9 poetry-core, 10 11 # dependencies 12 async-timeout, 13 cloudevents, 14 fastapi, 15 grpcio, 16 httpx, 17 kubernetes, 18 numpy, 19 orjson, 20 pandas, 21 prometheus-client, 22 protobuf, 23 psutil, 24 pydantic, 25 python-dateutil, 26 pyyaml, 27 ray, 28 six, 29 tabulate, 30 timing-asgi, 31 uvicorn, 32 33 # checks 34 avro, 35 azure-storage-blob, 36 azure-storage-file-share, 37 boto3, 38 botocore, 39 google-cloud-storage, 40 grpcio-testing, 41 pytest-asyncio, 42 pytestCheckHook, 43 tomlkit, 44}: 45 46buildPythonPackage rec { 47 pname = "kserve"; 48 version = "0.13.1"; 49 pyproject = true; 50 51 disabled = pythonOlder "3.8"; 52 53 src = fetchFromGitHub { 54 owner = "kserve"; 55 repo = "kserve"; 56 rev = "refs/tags/v${version}"; 57 hash = "sha256-wGS001PK+k21oCOaQCiAtytTDjfe0aiTVJ9spyOucYA="; 58 }; 59 60 sourceRoot = "${src.name}/python/kserve"; 61 62 build-system = [ 63 deprecation 64 poetry-core 65 ]; 66 67 dependencies = [ 68 async-timeout 69 cloudevents 70 fastapi 71 grpcio 72 httpx 73 kubernetes 74 numpy 75 orjson 76 pandas 77 prometheus-client 78 protobuf 79 psutil 80 pydantic 81 python-dateutil 82 pyyaml 83 ray 84 six 85 tabulate 86 timing-asgi 87 uvicorn 88 ] ++ ray.passthru.optional-dependencies.serve-deps; 89 90 pythonRelaxDeps = [ 91 "fastapi" 92 "httpx" 93 "prometheus-client" 94 "protobuf" 95 "ray" 96 "uvicorn" 97 "psutil" 98 ]; 99 100 pythonImportsCheck = [ "kserve" ]; 101 102 nativeCheckInputs = [ 103 avro 104 azure-storage-blob 105 azure-storage-file-share 106 boto3 107 botocore 108 google-cloud-storage 109 grpcio-testing 110 pytest-asyncio 111 pytestCheckHook 112 tomlkit 113 ]; 114 115 disabledTestPaths = [ 116 # Looks for a config file at the root of the repository 117 "test/test_inference_service_client.py" 118 ]; 119 120 disabledTests = [ 121 # Require network access 122 "test_health_handler" 123 "test_infer" 124 "test_infer_v2" 125 ]; 126 127 meta = { 128 description = "Standardized Serverless ML Inference Platform on Kubernetes"; 129 homepage = "https://github.com/kserve/kserve/tree/master/python/kserve"; 130 changelog = "https://github.com/kserve/kserve/releases/tag/v${version}"; 131 license = lib.licenses.asl20; 132 maintainers = with lib.maintainers; [ GaetanLepage ]; 133 }; 134}