Skip to content

Commit 31c9a88

Browse files
committed
[CHORE] remove hnsw-lib from dependencies
1 parent d40963f commit 31c9a88

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ COPY ./requirements.txt requirements.txt
2828

2929
RUN --mount=type=cache,target=/root/.cache/pip pip install maturin cffi patchelf
3030
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade --prefix="/install" -r requirements.txt
31-
RUN --mount=type=cache,target=/root/.cache/pip if [ "$REBUILD_HNSWLIB" = "true" ]; then pip install --no-binary :all: --force-reinstall --prefix="/install" chroma-hnswlib; fi
3231

3332
# Install gRPC tools for Python with fixed version
3433
RUN pip install grpcio==1.58.0 grpcio-tools==1.58.0
@@ -69,4 +68,3 @@ EXPOSE 8000
6968

7069
ENTRYPOINT ["/docker_entrypoint.sh"]
7170
CMD [ "--workers ${CHROMA_WORKERS} --host ${CHROMA_HOST_ADDR} --port ${CHROMA_HOST_PORT} --proxy-headers --reload --log-config ${CHROMA_LOG_CONFIG} --timeout-keep-alive ${CHROMA_TIMEOUT_KEEP_ALIVE}"]
72-

Dockerfile.windows

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ WORKDIR C:\\chroma
99
COPY ./requirements.txt requirements.txt
1010

1111
RUN pip install --no-cache-dir --upgrade -r requirements.txt
12-
RUN if ($env:REBUILD_HNSWLIB -eq 'true') { pip install --no-binary :all: --force-reinstall --no-cache-dir chroma-hnswlib }
1312

1413
COPY ./bin/docker_entrypoint.ps1 C:\\docker_entrypoint.ps1
1514
COPY ./ C:\\chroma

chromadb/test/utils/cross_version.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def install(pkg: str, path: str, dep_overrides: Dict[str, str]) -> int:
5555
for dep, operator_version in dep_overrides.items():
5656
command.append(f"{dep}{operator_version}")
5757

58-
command.append("--no-binary=chroma-hnswlib")
58+
# Only add --no-binary=chroma-hnswlib if it's in the dependencies
59+
if "chroma-hnswlib" in pkg or any("chroma-hnswlib" in dep for dep in dep_overrides):
60+
command.append("--no-binary=chroma-hnswlib")
61+
5962
command.append(f"--target={path}")
6063

6164
print(f"Installing chromadb version {pkg} to {path}")

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ description = "Chroma."
77
readme = "README.md"
88
requires-python = ">=3.9"
99
classifiers = ["Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent"]
10-
dependencies = ['build >= 1.0.3', 'pydantic >= 1.9', 'chroma-hnswlib==0.7.6', 'fastapi==0.115.9', 'uvicorn[standard] >= 0.18.3', 'numpy >= 1.22.5', 'posthog >= 2.4.0', 'typing_extensions >= 4.5.0', 'onnxruntime >= 1.14.1', 'opentelemetry-api>=1.2.0', 'opentelemetry-exporter-otlp-proto-grpc>=1.2.0', 'opentelemetry-instrumentation-fastapi>=0.41b0', 'opentelemetry-sdk>=1.2.0', 'tokenizers >= 0.13.2', 'pypika >= 0.48.9', 'tqdm >= 4.65.0', 'overrides >= 7.3.1', 'importlib-resources', 'graphlib_backport >= 1.0.3; python_version < "3.9"', 'grpcio >= 1.58.0', 'bcrypt >= 4.0.1', 'typer >= 0.9.0', 'kubernetes>=28.1.0', 'tenacity>=8.2.3', 'PyYAML>=6.0.0', 'mmh3>=4.0.1', 'orjson>=3.9.12', 'httpx>=0.27.0', 'rich>=10.11.0', 'jsonschema>=4.19.0']
10+
dependencies = ['build >= 1.0.3', 'pydantic >= 1.9', 'fastapi==0.115.9', 'uvicorn[standard] >= 0.18.3', 'numpy >= 1.22.5', 'posthog >= 2.4.0', 'typing_extensions >= 4.5.0', 'onnxruntime >= 1.14.1', 'opentelemetry-api>=1.2.0', 'opentelemetry-exporter-otlp-proto-grpc>=1.2.0', 'opentelemetry-instrumentation-fastapi>=0.41b0', 'opentelemetry-sdk>=1.2.0', 'tokenizers >= 0.13.2', 'pypika >= 0.48.9', 'tqdm >= 4.65.0', 'overrides >= 7.3.1', 'importlib-resources', 'graphlib_backport >= 1.0.3; python_version < "3.9"', 'grpcio >= 1.58.0', 'bcrypt >= 4.0.1', 'typer >= 0.9.0', 'kubernetes>=28.1.0', 'tenacity>=8.2.3', 'PyYAML>=6.0.0', 'mmh3>=4.0.1', 'orjson>=3.9.12', 'httpx>=0.27.0', 'rich>=10.11.0', 'jsonschema>=4.19.0']
11+
12+
[project.optional-dependencies]
13+
dev = ['chroma-hnswlib==0.7.6']
1114

1215
[tool.black]
1316
line-length = 88

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
bcrypt>=4.0.1
2-
chroma-hnswlib==0.7.6
32
fastapi==0.115.9
43
graphlib_backport==1.0.3; python_version < '3.9'
54
grpcio>=1.58.0

requirements_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
black==23.3.0 # match what's in pyproject.toml
22
build
3+
chroma-hnswlib==0.7.6
34
grpcio-tools==1.67.1 # Later version not compatible with protobuf 4.25.5
45
httpx
56
hypothesis==6.112.2 # TODO: Resolve breaking changes and bump version

0 commit comments

Comments
 (0)