-
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
[ENH]: Docker compose data volume #1119
[ENH]: Docker compose data volume #1119
Conversation
Added persistent volume in all docker compose files. The advantage is that by default user's data is not lost when `docker compose down` is executed unless `--volume` is provided. This gives a default behaviour that is non-destructive towards user data.
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
- Aligned warnings in the usage guide Refs: chroma-core/chroma#1119
- Added a docker command to move data out from the docker compose volume to the host machine of the user Refs: chroma-core/chroma#1119
@beggers Can you take a look at this? |
Really sorry to just be looking at this now. Do Docker tests pass too? |
@beggers, no issue; this is not urgent. Yes, integration tests (using docker-compose) are passing. |
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.
:)
docker-compose.yml
Outdated
@@ -12,6 +12,7 @@ services: | |||
dockerfile: Dockerfile | |||
volumes: | |||
- ./:/chroma |
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.
I think we should clean this up and verify that the data is where we expect. The way I think it is working rn is we are mounting your CWD as where the data is stored
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.
Removed.
But yes, essentially we did the following:
- Build an image where chroma is deployed under
/chroma/
- Mount and override the container
/chroma
path with CWD
One of the reasons the above has worked so far is that the build and run of the docker container happens on the same machine and from the root of the repo.
docker-compose.test-auth.yml
Outdated
@@ -30,5 +30,3 @@ services: | |||
volumes: | |||
test_index_data: |
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.
lets rename the volume to something more sensible
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.
Renamed to chroma-data
. Easy to reason about.
Let's also add docs |
# Conflicts: # docker-compose.test-auth.yml # docker-compose.test.yml
Description of changes
Summarize the changes made by this PR.
docker compose down
is executed unless--volume
is provided. This gives a default behaviour that is non-destructive towards user data.Test plan
How are these changes tested?
pytest
for python,yarn test
for jsDocumentation Changes
N/A