at master 2.6 kB view raw
1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 clarifai-grpc, 6 clarifai-protocol, 7 click, 8 fetchFromGitHub, 9 fsspec, 10 huggingface-hub, 11 inquirerpy, 12 numpy, 13 pillow, 14 pkgs, 15 psutil, 16 pycocotools, 17 pydantic-core, 18 pytest-asyncio, 19 pytestCheckHook, 20 pythonOlder, 21 pyyaml, 22 rich, 23 ruff, 24 schema, 25 setuptools, 26 tabulate, 27 tqdm, 28 tritonclient, 29 uv, 30 writableTmpDirAsHomeHook, 31}: 32 33buildPythonPackage rec { 34 pname = "clarifai"; 35 version = "11.8.2"; 36 pyproject = true; 37 38 disabled = pythonOlder "3.8"; 39 40 src = fetchFromGitHub { 41 owner = "Clarifai"; 42 repo = "clarifai-python"; 43 tag = version; 44 hash = "sha256-7luvK7xnkJRALXm7X7mg6VG9qRpq9pmFdBRW2GP3heI="; 45 }; 46 47 pythonRelaxDeps = [ 48 "clarifai-protocol" 49 "click" 50 "fsspec" 51 "ruff" 52 "schema" 53 "uv" 54 ]; 55 56 build-system = [ setuptools ]; 57 58 dependencies = [ 59 aiohttp 60 clarifai-grpc 61 clarifai-protocol 62 click 63 fsspec 64 inquirerpy 65 numpy 66 pillow 67 psutil 68 pydantic-core 69 pyyaml 70 rich 71 ruff 72 schema 73 tabulate 74 tqdm 75 tritonclient 76 uv 77 ]; 78 79 optional-dependencies = { 80 all = [ pycocotools ]; 81 }; 82 83 nativeCheckInputs = [ 84 pkgs.gitMinimal 85 huggingface-hub 86 pytest-asyncio 87 pytestCheckHook 88 writableTmpDirAsHomeHook 89 ]; 90 91 disabledTests = [ 92 # Test requires network access and API key 93 "test_export_workflow_general" 94 "test_validate_invalid_id" 95 "test_validate_invalid_hex_id" 96 ]; 97 98 disabledTestPaths = [ 99 # Tests require network access and API key 100 "tests/cli/test_compute_orchestration.py" 101 "tests/runners/test_download_checkpoints.py" 102 "tests/runners/test_model_run_locally.py" 103 "tests/runners/test_model_upload.py" 104 "tests/runners/test_num_threads_config.py" 105 "tests/runners/test_runners_proto.py" 106 "tests/runners/test_runners.py" 107 "tests/runners/test_url_fetcher.py" 108 "tests/runners/test_vllm_model_upload.py" 109 "tests/test_app.py" 110 "tests/test_data_upload.py" 111 "tests/test_eval.py" 112 "tests/test_list_models.py" 113 "tests/test_model_predict.py" 114 "tests/test_model_train.py" 115 "tests/test_rag.py" 116 "tests/test_search.py" 117 "tests/workflow/test_create_delete.py" 118 "tests/workflow/test_predict.py" 119 ]; 120 121 pythonImportsCheck = [ "clarifai" ]; 122 123 meta = with lib; { 124 description = "Clarifai Python Utilities"; 125 homepage = "https://github.com/Clarifai/clarifai-python"; 126 changelog = "https://github.com/Clarifai/clarifai-python/releases/tag/${src.tag}"; 127 license = licenses.asl20; 128 maintainers = with maintainers; [ natsukium ]; 129 mainProgram = "clarifai"; 130 }; 131}