Docker
Run Chroma in a Docker Container
- Python
- TypeScript
You can run a Chroma server in a Docker container, and access it using the This starts the server with the default configuration and stores data in
HttpClient. We provide images on both docker.com and ghcr.io.To start the server, run:./chroma-data (in your current working directory).The Chroma client can then be configured to connect to the server running in the Docker container.Configuration
Chroma is configured using a YAML file. Check out this config file detailing all available options. To use a custom config file, mount it into the container at/config.yaml like so:
Observability with Docker
Chroma is instrumented with OpenTelemetry hooks for observability. OpenTelemetry traces allow you to understand how requests flow through the system and quickly identify bottlenecks. Check out the observability docs for a full explanation of the available parameters. Here’s an example of how to create an observability stack with Docker Compose. The stack is composed of- a Chroma server
- OpenTelemetry Collector
- Zipkin
otel-collector-config.yaml:
- The
receiverssection specifies that the OpenTelemetry protocol (OTLP) will be used to receive data over GRPC and HTTP. exportersdefines that telemetry data is logged to the console (debug), and sent to azipkinserver (defined below indocker-compose.yml).- The
servicesection ties everything together, defining atracespipeline receiving data through ourotlpreceiver and exporting data tozipkinand via logging.
docker-compose.yml: