chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug]: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0

Open ShaditCuber opened this issue 10 months ago • 6 comments

Hello, I am using chromadb locally on windows operating system. When I want to deploy to AWS + Docker + ECR , I have an error when running the entire service since chroma db asks me for sqlite3 >= 3.35.0. And I have no control over the docker I use, since the image I get is the following

FROM public.ecr.aws/lambda/python:3.10

All this is set up with a FastApi

Versions

Last Version 0.4.24

Relevant log output

No response

ShaditCuber avatar Apr 09 '24 01:04 ShaditCuber

I have the same Issue. Please help!

Chrisvd9 avatar Apr 09 '24 01:04 Chrisvd9

Not in the org, but I saw in chromadb/init.py, lines 49-85 there is a workaround for colab that has this issue, maybe it is sufficient for you to hardcode the IN_COLAB variable in your case? An environment variable-based system could be a more permanent fix.

adrian-valente avatar Apr 09 '24 17:04 adrian-valente

@ShaditCuber, I just looked at the AWS lambda python 3.10 image public.ecr.aws/lambda/python:3.10 and it seems that it has very old version of sqlite3 - 3.7.1-ish. The image itself is base of Amazon Linux (centos fork).

One way to go about it is to build your own image off of the official lambda python image that will fix the sqlite3 problems (e.g. upgrade the sqlite3 version, I think I have somewhere a short script how to install sqlite3 from scratch on centos, gotta look for it).

Out of curiosity, why do you install chromadb core package on a lambda? If you plan to load up the data on every lambda call you might be looking at a hefty AWS bill, should you try to scale. Have you looked at chromadb-client library, it is only the thin client that uses HTTP to talk to a stateful Chroma instance and is a better fit for lambda or serverless workloads.

tazarov avatar Apr 11 '24 13:04 tazarov

@Chrisvd9, what is your setup? Is it also lambda?

tazarov avatar Apr 11 '24 13:04 tazarov

This worked for me.

streamlit: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0

I simply pasted


__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')

at the begining of __init__.py

AndrewTsai0406 avatar Apr 15 '24 07:04 AndrewTsai0406

Making this changes In chromadb/init.py worked for me.

https://github.com/chroma-core/chroma/compare/main...vsuhas9:chroma:patch-1?diff=unified&w=

vsuhas9 avatar Jul 19 '24 05:07 vsuhas9