-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made onxxrutime an optional dependency
- Loading branch information
Showing
10 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM python:3.11-alpine AS builder | ||
ARG REBUILD_HNSWLIB | ||
RUN apk add build-base && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir /install | ||
|
||
WORKDIR /install | ||
|
||
COPY ./requirements.txt requirements.txt | ||
# COPY ./requirements_optional.txt requirements_optional.txt onxxruntime doesn't support alpine T_T | ||
|
||
RUN pip install --no-cache-dir --upgrade --prefix="/install" -r requirements.txt | ||
# RUN pip install --no-cache-dir --upgrade --prefix="/install" -r requirements_optional.txt onxxrutime doesn't support alpoine T_T | ||
RUN if [ "$REBUILD_HNSWLIB" = "true" ]; then pip install --no-binary :all: --force-reinstall --no-cache-dir --prefix="/install" chroma-hnswlib; fi | ||
|
||
FROM python:3.11-alpine AS final | ||
|
||
RUN mkdir /chroma | ||
WORKDIR /chroma | ||
|
||
COPY --from=builder /install /usr/local | ||
COPY ./bin/docker_entrypoint.sh /docker_entrypoint.sh | ||
COPY ./ /chroma | ||
|
||
RUN apk add curl libstdc++ && \ | ||
chmod +x /docker_entrypoint.sh && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CHROMA_HOST_ADDR "0.0.0.0" | ||
ENV CHROMA_HOST_PORT 8000 | ||
ENV CHROMA_WORKERS 1 | ||
ENV CHROMA_LOG_CONFIG "chromadb/log_config.yml" | ||
ENV CHROMA_TIMEOUT_KEEP_ALIVE 30 | ||
|
||
EXPOSE 8000 | ||
|
||
ENTRYPOINT ["/bin/sh", "/docker_entrypoint.sh"] | ||
CMD [ "--workers ${CHROMA_WORKERS} --host ${CHROMA_HOST_ADDR} --port ${CHROMA_HOST_PORT} --proxy-headers --log-config ${CHROMA_LOG_CONFIG} --timeout-keep-alive ${CHROMA_TIMEOUT_KEEP_ALIVE}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
onnxruntime>=1.14.1 |