Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
4.9 kB · 245 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, hatchling, hatch-vcs, aiohttp, aiosqlite, attrs, cattrs, circus, click, click-option-group, cloudpickle, deepmerge, fs, fs-s3fs, grpcio, grpcio-channelz, grpcio-health-checking, grpcio-reflection, httpx, httpx-ws, inflection, inquirerpy, jinja2, numpy, nvidia-ml-py, opentelemetry-api, opentelemetry-exporter-otlp, opentelemetry-exporter-otlp-proto-http, opentelemetry-instrumentation, opentelemetry-instrumentation-aiohttp-client, opentelemetry-instrumentation-asgi, opentelemetry-instrumentation-grpc, opentelemetry-sdk, opentelemetry-semantic-conventions, opentelemetry-util-http, packaging, pandas, pathspec, pillow, pip-requirements-parser, prometheus-client, protobuf, psutil, pyarrow, pydantic, python-dateutil, python-json-logger, python-multipart, pyyaml, rich, schema, simple-di, starlette, tomli, tomli-w, tritonclient, uv, uvicorn, watchfiles, # native check inputs pytestCheckHook, pytest-xdist, google-api-python-client, scikit-learn, lxml, orjson, pytest-asyncio, fastapi,}:
let version = "1.3.20"; aws = [ fs-s3fs ]; grpc = [ grpcio grpcio-health-checking opentelemetry-instrumentation-grpc protobuf ]; io-image = [ pillow ]; io-pandas = [ pandas pyarrow ]; grpc-reflection = grpc ++ [ grpcio-reflection ]; grpc-channelz = grpc ++ [ grpcio-channelz ]; monitor-otlp = [ opentelemetry-exporter-otlp-proto-http opentelemetry-instrumentation-grpc ]; # tracing-jaeger = [ opentelemetry-exporter-jaeger ]; tracing-otlp = [ opentelemetry-exporter-otlp ]; # tracing-zipkin = [ opentelemetry-exporter-zipkin ]; io = io-image ++ io-pandas; tracing = tracing-otlp; # ++ tracing-zipkin ++ tracing-jaeger optional-dependencies = { all = aws ++ io ++ grpc ++ grpc-reflection ++ grpc-channelz ++ tracing ++ monitor-otlp; inherit aws grpc io-image io-pandas io grpc-reflection grpc-channelz monitor-otlp tracing-otlp tracing ; triton = [ tritonclient ] ++ lib.optionals stdenv.hostPlatform.isLinux ( tritonclient.optional-dependencies.http ++ tritonclient.optional-dependencies.grpc ); };
src = fetchFromGitHub { owner = "bentoml"; repo = "BentoML"; tag = "v${version}"; hash = "sha256-zc/JvnEEoV21EbBHhLBWvilidXHx1pxYsBYISFg16Us="; };inbuildPythonPackage { pname = "bentoml"; inherit version src; pyproject = true;
pythonRelaxDeps = [ "cattrs" "nvidia-ml-py" "opentelemetry-api" "opentelemetry-instrumentation-aiohttp-client" "opentelemetry-instrumentation-asgi" "opentelemetry-instrumentation" "opentelemetry-sdk" "opentelemetry-semantic-conventions" "opentelemetry-util-http" ];
build-system = [ hatchling hatch-vcs ];
dependencies = [ aiohttp aiosqlite attrs cattrs circus click click-option-group cloudpickle deepmerge fs httpx httpx-ws inflection inquirerpy jinja2 numpy nvidia-ml-py opentelemetry-api opentelemetry-instrumentation opentelemetry-instrumentation-aiohttp-client opentelemetry-instrumentation-asgi opentelemetry-sdk opentelemetry-semantic-conventions opentelemetry-util-http packaging pathspec pip-requirements-parser prometheus-client psutil pydantic python-dateutil python-json-logger python-multipart pyyaml rich schema simple-di starlette tomli-w uv uvicorn watchfiles ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
inherit optional-dependencies;
pythonImportsCheck = [ "bentoml" ];
preCheck = '' # required for CI testing # https://github.com/bentoml/BentoML/pull/4056/commits/66302b502a3f4df4e8e6643d2afefefca974073e export GITHUB_ACTIONS=1 '';
disabledTestPaths = [ "tests/e2e" "tests/integration" ];
disabledTests = [ # flaky test "test_store" ];
nativeCheckInputs = [ fastapi google-api-python-client lxml orjson pandas pillow pytest-asyncio pytest-xdist pytestCheckHook scikit-learn ] ++ optional-dependencies.grpc;
meta = with lib; { description = "Build Production-Grade AI Applications"; homepage = "https://github.com/bentoml/BentoML"; changelog = "https://github.com/bentoml/BentoML/releases/tag/${src.tag}"; license = licenses.asl20; maintainers = with maintainers; [ happysalada natsukium ]; # AttributeError: 'dict' object has no attribute 'schemas' # https://github.com/bentoml/BentoML/issues/4290 broken = versionAtLeast cattrs.version "23.2"; };}