chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Feature Request]: cli server option to turn off persistent file storage

Open nepeee opened this issue 1 year ago • 6 comments

Describe the problem

I don't need the persistent file storage, will be nice to have the option to turn it off.

Describe the proposed solution

I think the best way to implement it is to add an optional parameter that disables the file storage.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

nepeee avatar Jan 23 '24 18:01 nepeee

The default Chroma client is ephemeral and should not persist files - which files are you seeing persisted?

atroyn avatar May 15 '24 23:05 atroyn

I'm using the python chromadb.Client() with the cli server i think the issue is here: https://github.com/chroma-core/chroma/blob/main/chromadb/cli/cli.py#L60

nepeee avatar May 15 '24 23:05 nepeee

Ah, yes the server persists by default. I should be easy to add an argument to the CLI to allow it to be ephemeral - happy to support that PR if you want to take a crack at it.

atroyn avatar May 15 '24 23:05 atroyn

  • sorry i was wrong, i use the chromadb.HttpClient ofc

nepeee avatar May 15 '24 23:05 nepeee

I think you were right actually, if you are running a Chroma server via CLI, the server will persist files by default, regardless of the client(s) connecting to it.

atroyn avatar May 15 '24 23:05 atroyn

Well i meant about the client :) Anyways i checked what i did to hack it:

    os.environ["IS_PERSISTENT"] = "False"
    #os.environ["PERSIST_DIRECTORY"] = path
    #os.environ["CHROMA_SERVER_NOFILE"] = "65535" 

I can create a PR tomorrow but i'm not familiar with the typer arg parser lib so maybe thats a bad idea :P

nepeee avatar May 15 '24 23:05 nepeee