Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

408 ci update publish workflow w leapfrogai UI artifacts #464

Merged
17 changes: 15 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,25 @@ jobs:
docker image prune -af
rm zarf-package-leapfrogai-api-*.tar.zst

- name: Build and Publish UI
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${{ steps.get_version.outputs.version-without-v }} --push src/leapfrogai_ui

zarf package create packages/ui --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/ui --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm

zarf package publish zarf-package-leapfrogai-ui-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-leapfrogai-ui-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai

docker image prune -af
rm zarf-package-leapfrogai-ui-*.tar.zst

- name: Build and Publish repeater
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/repeater:${{ steps.get_version.outputs.version-without-v }} --push packages/repeater

zarf package create packages/repeater --set=LEAPFROGAI_IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/repeater --set=LEAPFROGAI_IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm
zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm

zarf package publish zarf-package-repeater-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-repeater-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ build-api: local-registry setup-api-deps ## Build the leapfrogai_api container a
uds zarf package create packages/api -o packages/api --registry-override=ghcr.io=localhost:5000 --insecure --set LEAPFROGAI_IMAGE_VERSION=${LOCAL_VERSION} --confirm


build-ui: ## Build the leapfrogai_ui container and Zarf package
jalling97 marked this conversation as resolved.
Show resolved Hide resolved
## Build the image (and tag it for the local registry)
docker build -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION} src/leapfrogai_ui
docker tag ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION} localhost:5000/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION}

## Push the image to the local registry (Zarf is super slow if the image is only in the local daemon)
docker push localhost:5000/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION}

## Build the Zarf package
uds zarf package create packages/ui -o packages/ui --registry-override=ghcr.io=localhost:5000 --insecure --set IMAGE_VERSION=${LOCAL_VERSION} --confirm


setup-llama-cpp-python-deps: sdk-wheel ## Download the wheels for the optional 'llama-cpp-python' dependencies
-rm packages/llama-cpp-python/build/*.whl
python -m pip wheel packages/llama-cpp-python -w packages/llama-cpp-python/build --find-links=${SDK_DEST}
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/chart/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ spec:
spec:
containers:
- name: {{ .Values.package.name }}
image: 'ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:###ZARF_CONST_IMAGE_VERSION###'
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 3000
env:
Expand All @@ -41,6 +42,7 @@ spec:
secretKeyRef:
name: supabase-jwt
key: anon-key
optional: true
{{ end }}
- name: PUBLIC_DISABLE_KEYCLOAK
value: '###ZARF_VAR_DISABLE_KEYCLOAK###'
Expand Down
12 changes: 12 additions & 0 deletions packages/ui/chart/ui-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
image:
repository: "ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui"
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: '###ZARF_CONST_IMAGE_VERSION###'

package:
name: lfaiui
host: lfaiui
supabase_url: '###ZARF_VAR_SUPABASE_URL###'
supabase_anon_key: '###ZARF_VAR_SUPABASE_ANON_KEY###'
message_length_limit: '###ZARF_VAR_MESSAGE_LENGTH_LIMIT###'
6 changes: 0 additions & 6 deletions packages/ui/chart/values.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions packages/ui/zarf-config.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions packages/ui/zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
kind: ZarfPackageConfig
metadata:
name: '###ZARF_PKG_TMPL_NAME###'
name: leapfrogai-ui
version: '###ZARF_PKG_TMPL_IMAGE_VERSION###'
architecture: amd64
description: >
A UI for LeapfrogAI

constants:
- name: IMAGE_VERSION
value: '###ZARF_PKG_TMPL_IMAGE_VERSION###'
- name: NAME
value: '###ZARF_PKG_TMPL_NAME###'

variables:
- name: LEAPFROGAI_API_BASE_URL #LEAPFROGAI_API_BASE_URL
Expand Down Expand Up @@ -62,18 +61,19 @@ variables:
default: '10000'
prompt: true
sensitive: false

components:
- name: lfaiui
required: true
charts:
- name: lfaiui
namespace: leapfrogai
localPath: chart
version: '###ZARF_PKG_TMPL_IMAGE_VERSION###'
version: 0.6.1
valuesFiles:
- "chart/values.yaml"
- 'chart/ui-values.yaml'
images:
- '###ZARF_PKG_TMPL_IMAGE_REPOSITORY###:###ZARF_PKG_TMPL_IMAGE_VERSION###'
- ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:###ZARF_PKG_TMPL_IMAGE_VERSION###
actions:
onDeploy:
after:
Expand Down
7 changes: 0 additions & 7 deletions src/leapfrogai_ui/Makefile

This file was deleted.

Loading