content: 
  [tool.poetry]
  name = "infinity_emb"
  version = "0.0.77"
  description = "Infinity is a high-throughput, low-latency REST API for serving text-embeddings, reranking models and clip."
  authors = ["michaelfeil <noreply@michaelfeil.eu>"]
  license = "MIT"
  readme = "README.md"
  packages = [{include = "infinity_emb"}]
  homepage = "https://github.com/michaelfeil/infinity"
  repository = "https://github.com/michaelfeil/infinity"
  keywords = ["vector", "embedding", "neural", "search", "sentence-transformers"]
  
  [tool.poetry.dependencies]
  python = ">=3.9,<3.14"
  # basics, pin numpy <2 for onnx
  numpy = ">=1.20.0,<2"
  huggingface_hub= {version = ">=0.32.0"}
  # logging
  rich = {version = "^13", optional=true}
  # webserver-only
  fastapi = {version = ">=0.103.2", optional=true}
  orjson = {version = ">=3.9.8,!=3.10.0", optional=true} 
  prometheus-fastapi-instrumentator = {version = ">=6.1.0", optional=true}
  uvicorn = {version = "^0.32.0", optional=true, extras = ["standard"]}
  typer = {version = "^0.12.5", optional=true}
  pydantic = {version = ">=2.4.0,<3", optional=true} 
  posthog = {version = "*", optional=true}
  # backend
  # pin torch to a specific source, but default to pypi. use sed to overwrite.
  torch = {version = ">=2.2.1", source = "pypi", optional=true}
  sentence-transformers = {version = "^3.0.1", optional=true} 
  transformers = {version = ">=4.47.0,<=5.0", optional=true, extras=["sentencepiece"]}
  ctranslate2 = {version = ">=4.0.0", optional=true}
  optimum = {version = ">=1.24.0", optional=true, extras=["onnxruntime"]}
  einops = {version = "*", optional=true}
  # vision
  pillow = {version = "*", optional=true}
  timm = {version = "*", optional=true}
  colpali-engine = {version="^0.3.8", optional=true}
  # openvino
  # optimum-intel = {version=">=1.20.0", optional=true, extras=["openvino"]}
  # onnxruntime-openvino = {version=">=1.19.0", optional=true}
  # openvino = {version="2024.4.0", optional=true}
  # openvino-tokenizers = {version="2024.4.0.0", optional=true}
  
  
  # pin torchvision to a specific source, but default to pypi. use sed to overwrite.
  torchvision = {version = "*", source = "pypi", optional=true}
  # cache
  diskcache = {version = "*", optional=true}
  # gpu
  # https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html:
  # Most combinations of onnxruntime and tensorrt are not compatible, and some are broken.
  onnxruntime-gpu = {version = "1.19.*", optional=true} 
  tensorrt = {version = "^10.6.0", optional=true}
  soundfile = {version="^0.12.1", optional=true}
  
  
  [tool.poetry.scripts]
  infinity_emb = "infinity_emb.cli:cli"
  
  [tool.poetry.group.test.dependencies]
  pytest = "^8.0.0"
  pytest-mock = "*"
  httpx  = "*"
  asgi_lifespan = "*"
  anyio = "*"
  trio = "*"
  coverage = {extras = ["toml"], version = "^7.3.2"}
  mypy = "^1.12.0"
  requests = "2.32.3"
  types-requests = "2.28.1"
  openai = "*" # 1.51.0 works
  jinja2 = "*" 
  jinja2-cli = "*"
  
  # preferred dev dependencies
  # 2.6.0 is also pinned in docker image with flash-attn build
  torch = "2.8.0" 
  prometheus-fastapi-instrumentator = "7.0.0"
  # sentence-transformers = "3.3.1"
  transformers = "4.47.0"
  fastapi = "0.115.2"
  
  [tool.poetry.group.codespell.dependencies]
  codespell = "^2.2.0"
  
  [tool.poetry.group.mkdocs.dependencies]
  mkdocs-material = "*"
  mike = "*"
  mkdocs-swagger-ui-tag = "*"
  
  [tool.poetry.group.lint.dependencies]
  ruff = "^0.7.0"
  types-toml = "^0.10.8.1"
  types-redis = "^4.3.21.6"
  types-pytz = "^2023.3.0.0"
  black = "^24.10.0"
  types-chardet = "^5.0.4.6"
  mypy-protobuf = "^3.0.0"
  
  [tool.poetry.extras]
  ct2=["ctranslate2","sentence-transformers","torch","transformers"]
  optimum=["optimum"]
  torch=["sentence-transformers","torch"]
  einops=["einops"]
  logging=["rich"]
  cache=["diskcache"]
  vision=["colpali-engine","pillow","timm","torchvision"]
  # openvino=["onnxruntime-openvino","openvino","openvino-tokenizers"]
  audio=["soundfile"]
  server=[
      "fastapi",
      "orjson",
      "prometheus-fastapi-instrumentator",
      "posthog",
      "pydantic",
      "rich",
      "typer",
      "uvicorn",
  ]
  all=[
      "colpali-engine",
      "ctranslate2",
      "diskcache",
      "einops",
      "fastapi", 
      "optimum",
      "orjson", 
      "pillow",
      "prometheus-fastapi-instrumentator", 
      "posthog",
      "pydantic", 
      "rich", 
      "sentence-transformers",
      "timm",
      "torch", 
      "torchvision",
      "typer", 
      "uvicorn",
      "soundfile"
  ]
  # non-default gpu
  tensorrt=["tensorrt"]
  onnxruntime-gpu=["onnxruntime-gpu"]
  
  [[tool.poetry.source]]
  name = "pypi"
  priority = "primary"
  
  [[tool.poetry.source]]
  # used for monkey-patching cpu onlu
  name = "pytorch_cpu"
  url = "https://download.pytorch.org/whl/cpu"
  priority = "explicit"
  
  [[tool.poetry.source]]
  # used for monkey-patching rocm only
  name = "pytorch_rocm"
  url = "https://download.pytorch.org/whl/rocm6.1"
  priority = "explicit"
  
  [tool.pytest.ini_options]
  markers = [
      "performance: tests that measure performance (deselect with '-m \"not performance\"')",
  ]
  
  [tool.ruff]
  line-length = 100
  
  [tool.codespell]
  skip = "./tests/data/benchmark,*.lock"
  
  [build-system]
  requires = ["poetry-core"]
  build-backend = "poetry.core.masonry.api"
  