Skip to content

Commit 95c0748

Browse files
[CHORE] remove hnsw-lib from core dependencies (chroma-core#4385)
2 parents 5774aa3 + 21ab6b8 commit 95c0748

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ EXPOSE 8000
6969

7070
ENTRYPOINT ["/docker_entrypoint.sh"]
7171
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
FROM python:3.11.9
22
ARG REBUILD_HNSWLIB
3-
43
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
54
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"; `Start-Process -filepath C:\vc_redist.x64.exe -ArgumentList "/install", "/passive", "/norestart" -Passthru | Wait-Process; `Remove-Item -Force vc_redist.x64.exe;
65

76
WORKDIR C:\\chroma
87

98
COPY ./requirements.txt requirements.txt
9+
COPY ./requirements_dev.txt requirements_dev.txt
1010

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

1415
COPY ./bin/docker_entrypoint.ps1 C:\\docker_entrypoint.ps1
@@ -19,7 +20,6 @@ ENV CHROMA_HOST_PORT 8000
1920
ENV CHROMA_WORKERS 1
2021
ENV CHROMA_LOG_CONFIG "chromadb/log_config.yml"
2122
ENV CHROMA_TIMEOUT_KEEP_ALIVE 30
22-
2323
EXPOSE 8000
2424

2525
ENTRYPOINT ["powershell", "C:\\\\docker_entrypoint.ps1"]

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)