chroma-core / chroma-core/chroma

[Feature Request]: Cache model download in Docker image

Open
#792 3 comments 0 reactions 1 assignee Claimed by @HammadB View on GitHub
enhancement to-discuss
Dominant language
Rust
Stars
29.3k
Forks
2.5k
Avg merge
1d 4h
Merged PRs (30d)
38

Description

### Describe the problem

I would like to avoid the redownload of the all-MiniLM-L6-v2 dependency

### Describe the proposed solution

The following seems to work for me, but maybe there's a simpler solution by calling the appropriate Python method instead:
```docker
# https://github.com/chroma-core/chroma/blob/main/chromadb/utils/embedding_functions.py#L208
RUN MODEL_DIR="/root/.cache/chroma/onnx_models/all-MiniLM-L6-v2" &&\
ARCHIVE_NAME="onnx.tar.gz" &&\
mkdir -p $MODEL_DIR &&\
cd $MODEL_DIR &&\
wget -O $ARCHIVE_NAME "https://chroma-onnx-models.s3.amazonaws.com/all-MiniLM-L6-v2/$ARCHIVE_NAME" &&\
tar -xzf $ARCHIVE_NAME
```

### Alternatives considered

If this is good-enough, feel free to add it to the documentation.
Alternatively, maybe
```
VOLUME /root/.cache/chroma
```

would be enough, but couldn't get it to work properly with IntelliJ runs...

### Importance

nice to have

### Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.