Skip to content
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

[Install issue]: Run with Environment Variables #3151

Closed
scythetrigger opened this issue Nov 17, 2024 · 1 comment
Closed

[Install issue]: Run with Environment Variables #3151

scythetrigger opened this issue Nov 17, 2024 · 1 comment
Labels
installation trouble trouble building or installing chroma

Comments

@scythetrigger
Copy link

What happened?

I've tried many combinations of environment variables, but I still can't get chromadb to run in my docker container. Note: chroma runs fine if I do "chroma run --host 0.0.0.0 --port 8000

Versions

chromadb==0.5.18, python v3.12, ubi9.4

Relevant log output

ENTRYPOINT ["chroma", "run"]
docker run -d -p 8000:8000 \
-e CHROMA_INTEGRATION_TEST_ONLY=1 \
-e CHROMA_API_IMPL=chromadb.api.fastapi.FastAPI \
-e CHROMA_SERVER_HOST=localhost \
-e CHROMA_SERVER_HTTP_PORT=8000 \
-e CHROMA_SERVER_NOFILE=65535 \
--add-host=localhost:host-gateway \
-v chroma:/app/.chroma \
--name chroma \
--restart always chroma
[Errno 99] error while attempting to bind on address ('192.168.65.254', 8000): cannot assign requested address

-e CHROMA_API_IMPL=rest \
-e CHROMA_SERVER_HOST=0.0.0.0 \
-e CHROMA_SERVER_HTTP_PORT=8000 \
-e CHROMA_SERVER_AUTHN_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider \
-e CHROMA_AUTH_TOKEN_TRANSPORT_HEADER= \
-e CHROMA_SERVER_AUTHN_CREDENTIALS= \
-e CHROMA_CLIENT_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthClientProvider \
-e CHROMA_AUTH_TOKEN_TRANSPORT_HEADER= \
-e CHROMA_CLIENT_AUTH_CREDENTIALS= \
@scythetrigger scythetrigger added the installation trouble trouble building or installing chroma label Nov 17, 2024
@tazarov
Copy link
Contributor

tazarov commented Nov 20, 2024

@scythetrigger, I think the issue is the --add-host=localhost:host-gateway. What this tells docker is to do a dns mapping for localhost to the gateway IP which in your case is 192.168.65.254. Given that the the gateway IP is not owned by the container and its interfaces the failure to bind is kind of expected.

Another protip here remove -e CHROMA_API_IMPL=rest as this will also cause a failure, the option is no longer supported in Chroma.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation trouble trouble building or installing chroma
Projects
None yet
Development

No branches or pull requests

3 participants