Skip to content

Commit

Permalink
fix: Fixed reinstall of hnswlib causing numpy 2.x to be installed
Browse files Browse the repository at this point in the history
- Fixed an issue with auth headers for 0.5.x

Refs: #55
  • Loading branch information
tazarov committed Aug 22, 2024
1 parent fa2d1d5 commit cfca0fb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
19 changes: 13 additions & 6 deletions charts/chromadb-chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,20 @@ spec:
- name: CHROMA_SERVER_HTTP_PORT
value: "{{ .Values.chromadb.serverHttpPort }}"
{{- end }}
{{- if and (semverCompare ">= 0.4.8" .Values.chromadb.apiVersion) .Values.chromadb.auth.enabled (eq .Values.chromadb.auth.type "token") }}
{{- toYaml .Values.chromadb.auth.token.config.env | nindent 12 }}
- name: CHROMA_SERVER_AUTH_TOKEN_TRANSPORT_HEADER
value: {{ .Values.chromadb.auth.token.headerType }}
{{- if and .Values.chromadb.auth.enabled (eq .Values.chromadb.auth.type "token") }}
{{- if and (semverCompare ">= 0.4.7" .Values.chromadb.apiVersion) (semverCompare "< 0.5.0" .Values.chromadb.apiVersion) }}
- name: CHROMA_SERVER_AUTH_CREDENTIALS
{{- else if (semverCompare ">= 0.5.0" .Values.chromadb.apiVersion)}}
- name: CHROMA_SERVER_AUTHN_CREDENTIALS
{{- end }}
{{- if and (semverCompare ">= 0.4.7" .Values.chromadb.apiVersion) .Values.chromadb.auth.enabled (eq .Values.chromadb.auth.type "basic") }}
{{- toYaml .Values.chromadb.auth.basic.config.env | nindent 12 }}
valueFrom:
secretKeyRef:
name: chromadb-auth
key: token
{{- end }}
{{- if and .Values.chromadb.auth.enabled (eq .Values.chromadb.auth.type "basic") }}
- name: CHROMA_SERVER_AUTH_CREDENTIALS_FILE
value: "/chroma/auth/server.htpasswd"
{{- end }}
ports:
- containerPort: {{ .Values.chromadb.serverHttpPort }}
Expand Down
21 changes: 1 addition & 20 deletions charts/chromadb-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,6 @@ chromadb:
basic:
username: "chroma"
password: null # The string used as the auth.basic password. Only used if value not null, otherwise a random string will be generated and used.
config:
env:
- name: CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER
value: "chromadb.auth.providers.HtpasswdFileServerAuthCredentialsProvider"
- name: CHROMA_SERVER_AUTH_PROVIDER
value: "chromadb.auth.basic.BasicAuthServerProvider"
- name: CHROMA_SERVER_AUTH_CREDENTIALS_FILE
value: "/chroma/auth/server.htpasswd"
token:
headerType: "AUTHORIZATION" #possible values AUTHORIZATION, X_CHROMA_TOKEN
headerType: "Authorization" #possible values Authorization, X-Chroma-Token
value: null # The string used as the token (value). Only used if value not null, otherwise a random string will be generated and used.
config:
env:
- name: CHROMA_SERVER_AUTH_CREDENTIALS
valueFrom:
secretKeyRef:
name: chromadb-auth
key: token
- name: CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER
value: "chromadb.auth.token.TokenConfigServerAuthCredentialsProvider"
- name: CHROMA_SERVER_AUTH_PROVIDER
value: "chromadb.auth.token.TokenAuthServerProvider"
2 changes: 1 addition & 1 deletion image/docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export CHROMA_SERVER_HOST=${CHROMA_SERVER_HOST:-"0.0.0.0"}
sudo chown -R chroma:chroma ${PERSIST_DIRECTORY}

. /chroma/venv/bin/activate
pip install --force-reinstall --no-cache-dir chroma-hnswlib
#pip install --force-reinstall --no-cache-dir chroma-hnswlib
uvicorn chromadb.app:app --workers 1 --host ${CHROMA_SERVER_HOST} --port ${CHROMA_SERVER_HTTP_PORT} --proxy-headers --log-config ${CHROMA_SERVER_LOG_CONFIG}

0 comments on commit cfca0fb

Please sign in to comment.