Files
chroma/Dockerfile
Peter Solimine d609804198 update dockerfile to include a version of gcc that supports C++11 (#738)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Fixes #721 
- The remote image was not building properly because hnswlib needed a
version of gcc that supported C++11
 - New functionality
- Added `gcc` and `g++` 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](https://github.com/chroma-core/docs)?*

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 the
`docker-compose.server.example.yml` file.

Co-authored-by: Jeff Huber <jeff@trychroma.com>
2023-07-24 08:58:44 -07:00

34 lines
732 B
Docker

FROM python:3.10-slim-bookworm as builder
RUN apt-get update --fix-missing && apt-get install -y --fix-missing \
build-essential \
gcc \
g++ && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /install
WORKDIR /install
COPY ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade --prefix="/install" -r requirements.txt
FROM python:3.10-slim-bookworm as final
RUN apt-get update --fix-missing && apt-get install -y --fix-missing \
build-essential \
gcc \
g++ && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /chroma
WORKDIR /chroma
COPY --from=builder /install /usr/local
COPY ./bin/docker_entrypoint.sh /docker_entrypoint.sh
COPY ./ /chroma
EXPOSE 8000
CMD ["/docker_entrypoint.sh"]