-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ghcr.io/chroma-core/chroma
does not support arm64 architecture
#972
Labels
bug
Something isn't working
Comments
I was able to get this to work abit better with the following diff: diff --git a/Dockerfile b/Dockerfile
index 489a6a96..f95c98f5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,6 @@
-FROM python:3.10-slim-bookworm as builder
+FROM --platform=$BUILDPLATFORM python:3.10-slim-bookworm as builder
+
+ARG BUILDPLATFORM
RUN apt-get update --fix-missing && apt-get install -y --fix-missing \
build-essential \
@@ -13,7 +15,9 @@ 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
+FROM --platform=$TARGETPLATFORM python:3.10-slim-bookworm as final
+
+ARG TARGETPLATFORM
RUN apt-get update --fix-missing && apt-get install -y --fix-missing \
build-essential \
diff --git a/bin/build b/bin/build
index 5e324198..ae908c4f 100755
--- a/bin/build
+++ b/bin/build
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-docker build . --target chroma_server -t ghcr.io/chroma-core/chroma-server:`bin/version`
+docker buildx build --load . --target chroma_server -t ghcr.io/jpmcb/chroma-server:`bin/version`
diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh
index 3b0d146c..afb672d7 100755
--- a/bin/docker_entrypoint.sh
+++ b/bin/docker_entrypoint.sh
@@ -1,6 +1,4 @@
#!/bin/bash
-echo "Rebuilding hnsw to ensure architecture compatibility"
-pip install --force-reinstall --no-cache-dir chroma-hnswlib
export IS_PERSISTENT=1
uvicorn chromadb.app:app --workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config log_config.yml Happy to open a PR. Essentially this:
This was build with: ❯ docker buildx build \
--tag=chroma-test:latest \
--load \
. And I'm able to run it locally with:
|
19 tasks
I think #857 is addressing this |
Nice! I'll give that change a try: thanks for pointing me to that! Closed by #857 |
@jpmcb Did that fix your issue? |
@jpmcb did this fix your issue? |
Closing as stale, I think #857 should address this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
On a M-chip Macbook, attempting to use chroma via the GitHub contaienr registry gives:
It then attempts to rebuild some bits for the different architecture which looks like it's intentionally rebuilds some dependencies to support cross architecture.
Is it possible to support
docker buildx
in the container build?chroma/bin/build
Line 3 in 6739259
May also be related to #642 with some discussion of supporting arm images builds.
Versions
Chroma image 0.4.5
Relevant log output
No response
The text was updated successfully, but these errors were encountered: