From d609804198b54e255caa4cc6676eb914ca7c2c07 Mon Sep 17 00:00:00 2001 From: Peter Solimine Date: Mon, 24 Jul 2023 08:58:44 -0700 Subject: [PATCH] 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 --- Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb56b05..489a6a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM python:3.10-slim-bookworm as builder -#RUN apt-get update -qq -#RUN apt-get install python3.10 python3-pip -y --no-install-recommends && rm -rf /var/lib/apt/lists_/* -RUN apt-get update --fix-missing && apt-get install -y --fix-missing build-essential +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 @@ -13,6 +15,12 @@ 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