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

[Feature Request]: Remove re-build during docker container entry #1002

Open
jpmcb opened this issue Aug 17, 2023 · 0 comments
Open

[Feature Request]: Remove re-build during docker container entry #1002

jpmcb opened this issue Aug 17, 2023 · 0 comments

Comments

@jpmcb
Copy link

jpmcb commented Aug 17, 2023

During container entry, it seems the entire stack is rebuild. Here are my logs from a simple docker-compose:

repo-query-chroma-1      | Collecting chroma-hnswlib
repo-query-chroma-1      |   Downloading chroma-hnswlib-0.7.2.tar.gz (31 kB)
repo-query-chroma-1      |   Installing build dependencies: started
repo-query-chroma-1      |   Installing build dependencies: finished with status 'done'
repo-query-chroma-1      |   Getting requirements to build wheel: started
repo-query-chroma-1      |   Getting requirements to build wheel: finished with status 'done'
repo-query-chroma-1      |   Preparing metadata (pyproject.toml): started
repo-query-chroma-1      |   Preparing metadata (pyproject.toml): finished with status 'done'
repo-query-chroma-1      | Collecting numpy
repo-query-chroma-1      |   Downloading numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
repo-query-chroma-1      |      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 10.7 MB/s eta 0:00:00
repo-query-chroma-1      | Building wheels for collected packages: chroma-hnswlib
repo-query-chroma-1      |   Building wheel for chroma-hnswlib (pyproject.toml): started
repo-query-chroma-1      |   Building wheel for chroma-hnswlib (pyproject.toml): still running...
repo-query-chroma-1      |   Building wheel for chroma-hnswlib (pyproject.toml): finished with status 'done'
repo-query-chroma-1      |   Created wheel for chroma-hnswlib: filename=chroma_hnswlib-0.7.2-cp310-cp310-linux_x86_64.whl size=2240435 sha256=e9a31acae99a9130ea9e767052b1c9367db009b00b1a9aba9669501195824952
repo-query-chroma-1      |   Stored in directory: /tmp/pip-ephem-wheel-cache-r3a58g0s/wheels/11/2b/0d/ee457f6782f75315bb5828d5c2dc5639d471afbd44a830b9dc
repo-query-chroma-1      | Successfully built chroma-hnswlib
repo-query-chroma-1      | Installing collected packages: numpy, chroma-hnswlib
repo-query-chroma-1      |   Attempting uninstall: numpy
repo-query-chroma-1      |     Found existing installation: numpy 1.21.6
repo-query-chroma-1      |     Uninstalling numpy-1.21.6:
repo-query-chroma-1      |       Successfully uninstalled numpy-1.21.6
repo-query-chroma-1      |   Attempting uninstall: chroma-hnswlib
repo-query-chroma-1      |     Found existing installation: chroma-hnswlib 0.7.2
repo-query-chroma-1      |     Uninstalling chroma-hnswlib-0.7.2:
repo-query-chroma-1      |       Successfully uninstalled chroma-hnswlib-0.7.2
repo-query-chroma-1      | Successfully installed chroma-hnswlib-0.7.2 numpy-1.25.2
repo-query-chroma-1      | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
repo-query-chroma-1      |
repo-query-chroma-1      | [notice] A new release of pip is available: 23.0.1 -> 23.2.1
repo-query-chroma-1      | [notice] To update, run: pip install --upgrade pip
repo-query-chroma-1      | 2023-08-17 15:14:47 INFO     chromadb.telemetry.posthog Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
repo-query-chroma-1      | 2023-08-17 15:14:47 DEBUG    chromadb.config Starting component System
repo-query-chroma-1      | 2023-08-17 15:14:47 DEBUG    chromadb.config Starting component Posthog
repo-query-chroma-1      | 2023-08-17 15:14:47 DEBUG    chromadb.config Starting component SqliteDB
repo-query-chroma-1      | 2023-08-17 15:14:48 DEBUG    chromadb.config Starting component LocalSegmentManager
repo-query-chroma-1      | 2023-08-17 15:14:48 DEBUG    chromadb.config Starting component SegmentAPI
repo-query-chroma-1      | 2023-08-17 15:14:48 INFO     uvicorn.error   Started server process [85]
repo-query-chroma-1      | 2023-08-17 15:14:48 INFO     uvicorn.error   Waiting for application startup.
repo-query-chroma-1      | 2023-08-17 15:14:48 INFO     uvicorn.error   Application startup complete.
repo-query-chroma-1      | 2023-08-17 15:14:48 INFO     uvicorn.error   Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

This entire operation seems to take upwards 1 min and I even saw it take 5 mins at one point.

Ideally, given a multi-architecture image, there shouldn't be any rebuilding and Chroma should come up right away.


Shouldn't this also remove the need to rebuild dependencies during container entry?

echo "Rebuilding hnsw to ensure architecture compatibility"
pip install --force-reinstall --no-cache-dir chroma-hnswlib

Originally posted by @jpmcb in #857 (review)

@jpmcb jpmcb changed the title Remove re-build during docker container entry [Feature Request]: Remove re-build during docker container entry Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant