search

Semantic image search using FastEmbed and sqlite-vec

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
[project]
name = "search"
version = "0.1.0"
description = "Semantic file search using FastEmbed and sqlite-vec"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "fastembed>=0.5.0",
    "pillow-avif-plugin>=1.4.6",
    "platformdirs>=4.3.6",
    "sqlite-vec>=0.1.6",
    "watchdog>=6.0.0",
]

[project.optional-dependencies]
intel = [
    "onnxruntime-openvino>=1.20.0",
]
nvidia = [
    "onnxruntime-gpu>=1.20.1",
]
amd = [
    "onnxruntime-rocm>=1.19.0",
]

[project.scripts]
search-server = "search:server"
search-client = "search:client"

[tool.uv]
package = true
# Need to manually add this
# https://github.com/astral-sh/uv/issues/8717
find-links = ["https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.1/"]
conflicts = [
    [
        { extra = "intel" },
        { extra = "nvidia" },
        { extra = "amd" },
    ]
]
# Uncomment if developing locally with GPU
# override-dependencies = [
#    "onnxruntime; sys_platform == 'never'",
# ]


# [[tool.uv.dependency-metadata]]
# name = "fastembed"
# version = "0.5.0"
# # https://github.com/qdrant/fastembed/blob/main/pyproject.toml
# # HORRIBLE HACK
# # fastembed has a hardcoded onnxruntime dependency but we need to override it but only for the GPU extras
# # So just nuke its onnxruntime dependency
# # We can't nuke it with something like this since then uv will never be able to install onnxruntime required by the CPU version
# # [tool.uv]
# # override-dependencies = [
# #    "onnxruntime; sys_platform == 'never'",
# # ]
# # And uv doesn't support per-extra override-dependencies
# # pipx should still be able to install the CPU version normally but not the GPU extras
# # I HATE PYTHON PACKAGING
# # and onnxruntime in particular
# requires-dist = ["onnx", "numpy", "tqdm", "requests", "tokenizers", "huggingface-hub", "loguru", "pillow", "mmh3", "py-rust-stemmers"]