Skip to content

Commit

Permalink
feat: Adding support for multiple chroma versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Aug 1, 2023
1 parent 65d62f2 commit 4df8d8b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Charts

on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"

jobs:
build-images:
strategy:
matrix:
chroma-version: [ 0.4.3, 0.4.4 ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Latest release
run: |
echo "Latest release: ${{ steps.releaser.outputs.chart_version }}"
echo "Changed charts: ${{ steps.releaser.outputs.changed_charts }}"
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push release Docker image
uses: docker/[email protected]
with:
context: .
file: image/Dockerfile
push: true
build-args: |
CHROMA_VERSION=${{ matrix.chroma-version }}
tags: "${{ env.IMAGE_NAME }}:${{ matrix.chroma-version }},${{ env.IMAGE_NAME }}:latest"
2 changes: 1 addition & 1 deletion charts/chromadb-chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
{{- end }}
containers:
- name: "chromadb"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ .Values.chromadb.apiVersion | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
env:
- name: POD_NAME
Expand Down
3 changes: 1 addition & 2 deletions charts/chromadb-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ image:
# repository: ghcr.io/chroma-core/chroma
repository: ghcr.io/amikos-tech/chromadb-chart/chroma
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

imagePullSecrets: [ ]
nameOverride: ""
Expand Down Expand Up @@ -95,6 +93,7 @@ startupProbe:
initialDelaySeconds: 10

chromadb:
apiVersion: "0.4.3"
allowReset: false
isPersistent: true
persistDirectory: /index_data
Expand Down
3 changes: 2 additions & 1 deletion image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ghcr.io/chroma-core/chroma:0.4.3
ARG CHROMA_VERSION=0.4.3
FROM ghcr.io/chroma-core/chroma:${CHROMA_VERSION} as base

COPY ./image/docker_entrypoint.sh /docker_entrypoint.sh
RUN find /chroma -mindepth 1 -maxdepth 1 ! \( -name 'chromadb' -o -name 'LICENSE' -o -name 'requirements.txt' \) -exec rm -rf {} \; && \
Expand Down

0 comments on commit 4df8d8b

Please sign in to comment.