chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
14.74k stars 1.23k forks source link

[Feature Request]: Github action for running the db #665

Open CakeCrusher opened 1 year ago

CakeCrusher commented 1 year ago

Describe the problem

There is no action to run chroma db for testing or any other use.

Describe the proposed solution

Create an github action that instantiates a db that can be accessed in the same runner or at least job.

Alternatives considered

Importance

would make my life easier

Additional Information

I currently need it for CI/CD testing in my npm package. I plan on making a PR for this soon. At face value it does not seem very difficult, I think the docker-compose does most of the heavy lifting. Any advice, suggestions, or requests please feel free to share them.

jeffchuber commented 1 year ago

@CakeCrusher the db does get run for tests on github

locally, currently I do this

  1. run docker
  2. inside clients/js run yarn test:run * Note - it will wipe your docker db you are running locally
CakeCrusher commented 1 year ago

@jeffchuber Although this repo has tests those tests would not pass within in a "github action" unless you instantiate a db within that workflow's runner. I briefly looked at the workflows here https://github.com/chroma-core/chroma/tree/main/.github/workflows and I don't think you are running the db in any of them. That is the capablity im looking for.

CakeCrusher commented 1 year ago

@jeffchuber do you know if there is an official docker build for the Chroma server? https://github.com/chroma-core/chroma/blob/main/docker-compose.yml#L8-L26 https://hub.docker.com/search?q=chromadb

CakeCrusher commented 1 year ago

@jeffchuber OMG! Youre right for some reason in this repo docker compose is ran when testing, thus starting up the server. EDIT: Figured out it is because of the npm scripts, they basically run docker-compose when testing.

jeffchuber commented 10 months ago

running Chroma in a publish github action seems useful, but also needs to be documented.