at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 huggingface-hub, 11 loguru, 12 mmh3, 13 numpy, 14 onnxruntime, 15 pillow, 16 py-rust-stemmers, 17 pystemmer, 18 requests, 19 snowballstemmer, 20 tokenizers, 21 tqdm, 22}: 23 24buildPythonPackage rec { 25 pname = "fastembed"; 26 version = "0.7.3"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "qdrant"; 31 repo = "fastembed"; 32 tag = "v${version}"; 33 hash = "sha256-sH/uiab+4fdowaEA+yNvA4PN7Xfuuu3eTF47FitEDvA="; 34 }; 35 36 build-system = [ poetry-core ]; 37 38 dependencies = [ 39 huggingface-hub 40 loguru 41 mmh3 42 numpy 43 onnxruntime 44 pillow 45 py-rust-stemmers 46 pystemmer 47 requests 48 snowballstemmer 49 tokenizers 50 tqdm 51 ]; 52 53 pythonImportsCheck = [ "fastembed" ]; 54 55 pythonRelaxDeps = [ 56 "mmh3" 57 "onnxruntime" 58 "pillow" 59 ]; 60 61 # there is one test and it requires network 62 doCheck = false; 63 64 meta = { 65 description = "Fast, Accurate, Lightweight Python library to make State of the Art Embedding"; 66 homepage = "https://github.com/qdrant/fastembed"; 67 changelog = "https://github.com/qdrant/fastembed/releases/tag/${src.tag}"; 68 license = lib.licenses.asl20; 69 maintainers = with lib.maintainers; [ happysalada ]; 70 # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' 71 badPlatforms = [ "aarch64-linux" ]; 72 }; 73}