Skip to content

Commit

Permalink
created v1.0 Docker Image for ChromaDB Server
Browse files Browse the repository at this point in the history
  • Loading branch information
Lventu5 committed Feb 10, 2024
1 parent 98900a4 commit eb3995c
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 1 deletion.
2 changes: 1 addition & 1 deletion categorizer/categorizer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package categorizer
package main

import (
"categorizer/analysis"
Expand Down
Empty file added chroma-image/.dockerignore
Empty file.
15 changes: 15 additions & 0 deletions chroma-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:latest
WORKDIR /app
COPY requirements.txt /app/
#RUN apt-get update && apt-get install -y python3 && apt-get install -y python3-pip
RUN pip install -r requirements.txt
RUN mkdir /app/vectorDB

#COPY /files/* /app/vectorDB
#COPY restoreDb.py /app/

#RUN python3 restoreDb.py

EXPOSE 8000

CMD chroma run # --path /vectorDB
Binary file added chroma-image/files/data-00000-of-00001.arrow
Binary file not shown.
29 changes: 29 additions & 0 deletions chroma-image/files/dataset_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"citation": "",
"description": "",
"features": {
"id": {
"dtype": "string",
"_type": "Value"
},
"embedding": {
"feature": {
"dtype": "float64",
"_type": "Value"
},
"_type": "Sequence"
},
"metadata": {
"file": {
"dtype": "string",
"_type": "Value"
}
},
"document": {
"dtype": "string",
"_type": "Value"
}
},
"homepage": "",
"license": "MIT"
}
13 changes: 13 additions & 0 deletions chroma-image/files/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"_data_files": [
{
"filename": "data-00000-of-00001.arrow"
}
],
"_fingerprint": "c6177d3da57accdd",
"_format_columns": null,
"_format_kwargs": {},
"_format_type": null,
"_output_all_columns": false,
"_split": null
}
3 changes: 3 additions & 0 deletions chroma-image/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
chroma-datasets==0.1.5
chroma-hnswlib==0.7.3
chromadb==0.4.14
5 changes: 5 additions & 0 deletions chroma-image/restoreDb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import chromadb
from chroma_datasets.utils import import_chroma_exported_hf_dataset_from_disk

cl = chromadb.HttpClient("0.0.0.0", 8000)
collection = import_chroma_exported_hf_dataset_from_disk(cl, "../iTACA/vectorDB", "payloads")
5 changes: 5 additions & 0 deletions chroma-image/start_chroma_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

docker run -p 8000:8000 -d chroma-server
sleep 5
python3 restoreDb.py

0 comments on commit eb3995c

Please sign in to comment.