Skip to content

Commit

Permalink
python312Packages.docling-ibm-models: init at 2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 6, 2024
1 parent f076c49 commit 7abe7c5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
75 changes: 75 additions & 0 deletions pkgs/development/python-modules/docling-ibm-models/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
huggingface-hub,
jsonlines,
lxml,
mean-average-precision,
numpy,
opencv-python-headless,
pillow,
torch,
torchvision,
tqdm,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "docling-ibm-models";
version = "2.0.3";
pyproject = true;

src = fetchFromGitHub {
owner = "DS4SD";
repo = "docling-ibm-models";
rev = "refs/tags/v${version}";
hash = "sha256-vSEW1+mFTjUvjjUOoX3aGgT/y8iwP3JGIZaPh9RbX5I=";
};

build-system = [
poetry-core
];

dependencies = [
huggingface-hub
jsonlines
lxml
mean-average-precision
numpy
opencv-python-headless
pillow
torch
torchvision
tqdm
];

pythonRelaxDeps = [
"lxml"
"mean_average_precision"
"torchvision"
];

pythonImportsCheck = [
"docling_ibm_models"
];

nativeCheckInputs = [
pytestCheckHook
];

disabledTests = [
# Requires network access
"test_layoutpredictor"
"test_tf_predictor"
];

meta = {
changelog = "https://github.com/DS4SD/docling-ibm-models/blob/${src.rev}/CHANGELOG.md";
description = "Docling IBM models";
homepage = "https://github.com/DS4SD/docling-ibm-models";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ drupol ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3680,6 +3680,8 @@ self: super: with self; {

dockerspawner = callPackage ../development/python-modules/dockerspawner { };

docling-ibm-models = callPackage ../development/python-modules/docling-ibm-models { };

docling-parse = callPackage ../development/python-modules/docling-parse {
loguru-cpp = pkgs.loguru;
};
Expand Down

0 comments on commit 7abe7c5

Please sign in to comment.