mirror of
https://github.com/placeholder-soft/chroma.git
synced 2026-01-12 22:44:55 +08:00
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>
This commit is contained in:
14
Dockerfile
14
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user