Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ WORKDIR /chroma
RUN make -C idl proto_python
RUN python3 -m maturin build
RUN pip uninstall chromadb -y
RUN pip install --prefix="/install" --find-links target/wheels/ --upgrade chromadb
RUN pip install --prefix="/install" target/wheels/chromadb*.whl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BestPractice]

The wildcard pattern target/wheels/chromadb*.whl could fail if multiple wheel files exist or no wheel files are found. If maturin build produces multiple wheels (e.g., for different Python versions) or fails to create any wheels, this command will either install the wrong version or fail entirely.

Consider being more explicit:

RUN pip install --prefix="/install" target/wheels/chromadb-*.whl

Or add error handling:

RUN pip install --prefix="/install" target/wheels/chromadb*.whl || (echo "No chromadb wheel found in target/wheels/" && exit 1)
Context for Agents
[**BestPractice**]

The wildcard pattern `target/wheels/chromadb*.whl` could fail if multiple wheel files exist or no wheel files are found. If `maturin build` produces multiple wheels (e.g., for different Python versions) or fails to create any wheels, this command will either install the wrong version or fail entirely.

Consider being more explicit:
```dockerfile
RUN pip install --prefix="/install" target/wheels/chromadb-*.whl
```

Or add error handling:
```dockerfile
RUN pip install --prefix="/install" target/wheels/chromadb*.whl || (echo "No chromadb wheel found in target/wheels/" && exit 1)
```

File: Dockerfile
Line: 52


FROM python:3.11-slim-bookworm AS final

Expand Down