-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update dockerfile to include a version of gcc that supports C++11 #738
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Dockerfile
Outdated
@@ -13,6 +15,11 @@ RUN pip install --no-cache-dir --upgrade --prefix="/install" -r requirements.txt | |||
|
|||
FROM python:3.10-slim-bullseye as final | |||
|
|||
RUN apt-get update && apt-get install -y \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need compilers in final image,
they have already served their purpose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is necessary, because the Docker script is currently configured to rebuild hnswlib on boot (which is necessary to make sure that hnswlib's capabilities match the actual hardware (e.g AVX/AVX2/AVX512).
Originally we only built hnswlib when building the docker image, but then if you ran it on a different kind of CPU from the one used to build it it could cause errors. This is a case where Docker is a leaky abstraction.
This should also solve #721 (the problem there isn't that it's a cross platform build, it's that the build tools are now required at runtime.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved, with @levand as well
Description of changes
Summarize the changes made by this PR.
gcc
andg++
to the list of installed packages in the builder image. This enables hnswlib to build properly.Test plan
How are these changes tested?
I recommend building the Docker image and running a container from it to ensure that everything runs smoothly.
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
No documentation changes are needed. However, it might be useful to build and push these changes to the image:
ghcr.io/chroma-core/chroma:latest
to resolve any issues with thedocker-compose.server.example.yml
file.