From 755a69b1c3523b7d11856ed4f17a6ad76898f228 Mon Sep 17 00:00:00 2001 From: Ben Eggers <64657842+beggers@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:22:24 -0800 Subject: [PATCH] Install Atlas in Coordinator's Docker container (#1472) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Install Atlas in the Coordinator's Docker container and copy the migrations. This makes it easy to run migrations before deploys. - Removed bash autocomplete from the Coordinator's Dockerfile. ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js - [x] Manually built the image, ran it, and ran migrations against a fresh database running locally in postgres ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* --- go/coordinator/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/go/coordinator/Dockerfile b/go/coordinator/Dockerfile index 79d86162d6d..038674dd633 100644 --- a/go/coordinator/Dockerfile +++ b/go/coordinator/Dockerfile @@ -12,12 +12,20 @@ FROM alpine:3.17.3 RUN apk add --no-cache bash bash-completion +# As of 6 Dec 2023, the atlas package isn't in Alpine's main package manager, only +# testing. So we have to add the testing repository to get it. +RUN apk add \ + --no-cache \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + atlas + RUN mkdir /chroma-coordinator WORKDIR /chroma-coordinator COPY --from=build /src/chroma-coordinator/bin/chroma /chroma-coordinator/bin/chroma ENV PATH=$PATH:/chroma-coordinator/bin -RUN chroma completion bash > ~/.bashrc +COPY --from=build /src/chroma-coordinator/migrations /chroma-coordinator/migrations CMD /bin/bash