2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, clarifai-grpc
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, inquirerpy
|
|
|
|
, llama-index-core
|
2024-01-02 11:29:13 +00:00
|
|
|
, numpy
|
|
|
|
, opencv4
|
2024-02-29 20:09:43 +00:00
|
|
|
, pandas
|
2024-01-02 11:29:13 +00:00
|
|
|
, pillow
|
2024-02-29 20:09:43 +00:00
|
|
|
, pycocotools
|
|
|
|
, pypdf
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
2024-01-02 11:29:13 +00:00
|
|
|
, pyyaml
|
|
|
|
, rich
|
|
|
|
, schema
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2024-01-02 11:29:13 +00:00
|
|
|
, tqdm
|
|
|
|
, tritonclient
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "clarifai";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "10.1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
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-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-/2PIsSsYr/R7DuTX/ndBAOX7C3IaFqPw16ZAX8E1Vk8=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"clarifai-grpc"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRemoveDeps = [
|
|
|
|
"opencv-python"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
clarifai-grpc
|
2024-02-29 20:09:43 +00:00
|
|
|
inquirerpy
|
|
|
|
llama-index-core
|
2024-01-02 11:29:13 +00:00
|
|
|
numpy
|
|
|
|
opencv4
|
2024-02-29 20:09:43 +00:00
|
|
|
pandas
|
2024-01-02 11:29:13 +00:00
|
|
|
pillow
|
2024-02-29 20:09:43 +00:00
|
|
|
pypdf
|
2024-01-02 11:29:13 +00:00
|
|
|
pyyaml
|
2024-02-29 20:09:43 +00:00
|
|
|
rich
|
|
|
|
schema
|
|
|
|
tqdm
|
|
|
|
tritonclient
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
all = [
|
|
|
|
pycocotools
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
2024-02-29 20:09:43 +00:00
|
|
|
# Test requires network access and API key
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_export_workflow_general"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-02-29 20:09:43 +00:00
|
|
|
# Tests require network access and API key
|
2024-01-02 11:29:13 +00:00
|
|
|
"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"
|
2024-02-29 20:09:43 +00:00
|
|
|
"tests/test_rag.py"
|
|
|
|
"clarifai/models/model_serving/repo_build/static_files/base_test.py"
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"clarifai"
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Clarifai Python Utilities";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/Clarifai/clarifai-python";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|