Skip to content

Commit 4d95f5e

Browse files
authored
Chroma fixes (#317)
1 parent 177c24d commit 4d95f5e

File tree

8 files changed

+80
-2
lines changed

8 files changed

+80
-2
lines changed

deploy/docker/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ services:
268268
image: 'chromadb/chroma:latest'
269269
environment:
270270
IS_PERSISTENT: 'TRUE'
271+
healthcheck:
272+
test: [ "CMD", "/bin/bash", "-c", "cat < /dev/null > /dev/tcp/localhost/8000" ]
273+
interval: 15s
274+
timeout: 15s
275+
retries: 15
276+
start_period: 20s
271277
volumes:
272278
- chromadb-data:/data
273279
# ports:

deploy/helm/templates/chatbot/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ spec:
3939
args:
4040
- "service"
4141
- {{ .Values.identity.service.name | quote }}
42+
- name: wait-for-chromadb
43+
image: {{ .Values.waitForK8sResources.image }}
44+
imagePullPolicy: {{ .Values.waitForK8sResources.imagePullPolicy }}
45+
args:
46+
- "service"
47+
- {{ .Values.chromadb.service.name | quote }}
4248
containers:
4349
- name: {{ .Values.chatbot.name }}
4450
image: {{ .Values.chatbot.image }}:{{ .Chart.AppVersion }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: chromadb-config
5+
labels:
6+
app: crapi-chromadb
7+
data:
8+
IS_PERSISTENT: "TRUE"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: crapi-chromadb
5+
labels:
6+
app: crapi-chromadb
7+
spec:
8+
ports:
9+
- port: 8000
10+
name: chromadb
11+
selector:
12+
app: crapi-chromadb
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: crapi-chromadb
5+
labels:
6+
app: crapi-chromadb
7+
spec:
8+
serviceName: crapi-chromadb
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: crapi-chromadb
13+
template:
14+
metadata:
15+
labels:
16+
app: crapi-chromadb
17+
spec:
18+
containers:
19+
- name: chromadb
20+
image: chromadb/chroma:latest
21+
imagePullPolicy: IfNotPresent
22+
ports:
23+
- containerPort: 8000
24+
envFrom:
25+
- configMapRef:
26+
name: chromadb-config
27+
volumeMounts:
28+
- mountPath: /data
29+
name: chromadb-data
30+
volumes:
31+
- name: chromadb-data
32+
persistentVolumeClaim:
33+
claimName: chromadb-pv-claim
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
kind: PersistentVolumeClaim
2+
apiVersion: v1
3+
metadata:
4+
name: chromadb-pv-claim
5+
labels:
6+
app: chromadb
7+
spec:
8+
#storageClassName: local-path
9+
accessModes:
10+
- ReadWriteOnce
11+
resources:
12+
requests:
13+
storage: 1000Mi

services/chatbot/src/chatbot/chat_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from uuid import uuid4
22
from langgraph.graph.message import Messages
3-
from services.chatbot.src.chatbot.retrieverutils import add_to_chroma_collection
3+
from .retrieverutils import add_to_chroma_collection
44
from .extensions import db
55
from .langgraph_agent import execute_langgraph_agent
66

services/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "crapi-web",
33
"version": "0.1.0",
4-
"proxy": "https://crapi.allvapps.com",
4+
"proxy": "http://localhost:8888",
55
"private": true,
66
"dependencies": {
77
"@ant-design/cssinjs": "^1.21.1",

0 commit comments

Comments
 (0)