2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2023-07-15 17:15:38 +00:00
|
|
|
, clarifai-grpc
|
2024-01-02 11:29:13 +00:00
|
|
|
, numpy
|
|
|
|
, opencv4
|
|
|
|
, pillow
|
|
|
|
, pyyaml
|
|
|
|
, rich
|
|
|
|
, schema
|
|
|
|
, tqdm
|
|
|
|
, tritonclient
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "clarifai";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "9.11.0";
|
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Clarifai";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "clarifai-python";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-4m4h2TbiZPvcpZn8h0z+GN+9w3Udik2NVAtFSF4gFgQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
clarifai-grpc
|
2024-01-02 11:29:13 +00:00
|
|
|
numpy
|
|
|
|
tqdm
|
|
|
|
opencv4
|
|
|
|
tritonclient
|
|
|
|
rich
|
|
|
|
schema
|
|
|
|
pillow
|
|
|
|
pyyaml
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# require network access and API key
|
|
|
|
"test_export_workflow_general"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# require network access and API key
|
|
|
|
"tests/test_app.py"
|
|
|
|
"tests/test_data_upload.py"
|
|
|
|
"tests/test_model_predict.py"
|
|
|
|
"tests/test_model_train.py"
|
|
|
|
"tests/test_search.py"
|
|
|
|
"tests/workflow/test_create_delete.py"
|
|
|
|
"tests/workflow/test_predict.py"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [ "clarifai" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Clarifai Python Utilities";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/Clarifai/clarifai-python";
|
|
|
|
changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${src.rev}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|