From c339e2fa12cec99164f41a3c22209191035a3213 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Nov 2025 10:46:29 +0000 Subject: [PATCH] python3Packages.model-hosting-container-standards: init at 0.1.9 --- .../default.nix | 78 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 + 2 files changed, 82 insertions(+) create mode 100644 pkgs/development/python-modules/model-hosting-container-standards/default.nix diff --git a/pkgs/development/python-modules/model-hosting-container-standards/default.nix b/pkgs/development/python-modules/model-hosting-container-standards/default.nix new file mode 100644 index 000000000000..369e1ff00cf8 --- /dev/null +++ b/pkgs/development/python-modules/model-hosting-container-standards/default.nix @@ -0,0 +1,78 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + poetry-core, + + # dependencies + fastapi, + httpx, + jmespath, + pydantic, + starlette, + supervisor, + + # tests + pytest-asyncio, + pytestCheckHook, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage rec { + pname = "model-hosting-container-standards"; + version = "0.1.9"; + pyproject = true; + + src = fetchFromGitHub { + owner = "aws"; + repo = "model-hosting-container-standards"; + tag = "v${version}"; + hash = "sha256-iy7lPtMM2J/zC1TUB5Eydtesy4JsjWTjACNlDhfSPA8="; + }; + + sourceRoot = "${src.name}/python"; + + build-system = [ + poetry-core + ]; + + pythonRelaxDeps = [ + "starlette" + ]; + pythonRemoveDeps = [ + # Declared as a runtime dependency, but not used in practice + "setuptools" + ]; + dependencies = [ + fastapi + httpx + jmespath + pydantic + starlette + supervisor + ]; + + pythonImportsCheck = [ "model_hosting_container_standards" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + writableTmpDirAsHomeHook + ]; + + disabledTests = [ + # AssertionError: Server should have created restart log + "test_continuous_restart_behavior" + "test_startup_retry_limit" + ]; + + meta = { + description = "Standardized Python framework for seamless integration between ML frameworks (TensorRT-LLM, vLLM) and Amazon SageMaker hosting"; + homepage = "https://github.com/aws/model-hosting-container-standards/tree/main/python"; + changelog = "https://github.com/aws/model-hosting-container-standards/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1ae6d7863b67..2ad16cd5dd6e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9717,6 +9717,10 @@ self: super: with self; { model-checker = callPackage ../development/python-modules/model-checker { }; + model-hosting-container-standards = + callPackage ../development/python-modules/model-hosting-container-standards + { }; + model-signing = callPackage ../development/python-modules/model-signing { }; modelcif = callPackage ../development/python-modules/modelcif { };