Skip to content

Commit

Permalink
chore!: standardize flavors, bundle dir and ghcr namespace (#933)
Browse files Browse the repository at this point in the history
## BREAKING CHANGES

- LeapfrogAI `latest` UDS bundles on `main` branch will break when this is merged unless the following is done:
  - add `-upstream` to all components in `latest` bundles
  - change namespace of the referenced repository to `packages/uds/leapfrogai`
- release-please does not currently work with flavors as it is currently configured to follow SemVer standards; manual changing of the `latest` bundles ref must be done moving forward until a fix (custom replacement strategy) is implemented

## CHANGES

- Moves bundles to UDS Common standard directory (`bundles/`)
- Shifts the target GHCR repository sub-directory from `packages/leapfrogai` to `packages/uds/leapfrogai` as part of the[ _Made For UDS_](https://github.com/defenseunicorns/uds-common/blob/main/docs/uds-package-practices.md) standard
- Adds `-upstream` as the default bundle ref and increments the ref manually

## NOTES

After 0.12.0 is released and artifacts are published, PR #977 should be merged in to add the UDS bundle manifest pointers necessary to use the `upstream` flavor and v0.12.0 in general.
  • Loading branch information
justinthelaw committed Sep 4, 2024
1 parent 020dc07 commit 985642a
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 57 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/e2e-registry1-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- milestoned # allows us to trigger on bot PRs
paths:
- .github/workflows/e2e-registry1-weekly.yaml
- uds-bundles/latest/**
- bundles/latest/**

concurrency:
group: e2e-registry1-weekly-${{ github.ref }}
Expand Down Expand Up @@ -59,14 +59,14 @@ jobs:
# Mutate UDS bundle definition to use Registry1 packages
- name: Mutation to Registry1 Bundle
run: |
uds zarf tools yq -i '.packages[1] |= del(.repository)' uds-bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .ref = "registry1"' uds-bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .path = "../../../packages/api"' uds-bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.metadata.version = "registry1"' uds-bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= del(.repository)' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .ref = "registry1"' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .path = "../../../packages/api"' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.metadata.version = "registry1"' bundles/latest/cpu/uds-bundle.yaml
- name: Create and Deploy Bundle
run: |
cd uds-bundles/latest/cpu
cd bundles/latest/cpu
uds create . --confirm && \
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst \
--set LEAPFROGAI_API_BASE_URL="http://leapfrogai-api.leapfrogai.svc.cluster.local:8080" --confirm --no-progress && \
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
zarf package create packages/api --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/api --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --confirm
zarf package publish zarf-package-leapfrogai-api-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-leapfrogai-api-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-leapfrogai-api-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-leapfrogai-api-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-leapfrogai-api-*.tar.zst
Expand All @@ -82,8 +82,8 @@ jobs:
zarf package create packages/ui --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/ui --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --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
zarf package publish zarf-package-leapfrogai-ui-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-leapfrogai-ui-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-leapfrogai-ui-*.tar.zst
Expand All @@ -95,8 +95,8 @@ jobs:
zarf package create packages/supabase --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/supabase --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --confirm
zarf package publish zarf-package-supabase-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-supabase-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-supabase-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-supabase-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
- name: Build and Publish repeater
run: |
Expand All @@ -105,8 +105,8 @@ jobs:
zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --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
zarf package publish zarf-package-repeater-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-repeater-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-repeater-*.tar.zst
Expand All @@ -118,8 +118,8 @@ jobs:
zarf package create packages/llama-cpp-python --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/llama-cpp-python --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --confirm
zarf package publish zarf-package-llama-cpp-python-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-llama-cpp-python-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-llama-cpp-python-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-llama-cpp-python-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-llama-*.tar.zst
Expand All @@ -130,7 +130,7 @@ jobs:
zarf package create packages/vllm --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --flavor upstream --confirm
zarf package publish zarf-package-vllm-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-vllm-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-vllm-*.tar.zst
Expand All @@ -142,8 +142,8 @@ jobs:
zarf package create packages/text-embeddings --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/text-embeddings --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --confirm
zarf package publish zarf-package-text-embeddings-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-text-embeddings-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-text-embeddings-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-text-embeddings-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-text-embeddings-*.tar.zst
Expand All @@ -155,8 +155,8 @@ jobs:
zarf package create packages/whisper --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --flavor upstream --confirm
zarf package create packages/whisper --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --flavor upstream --confirm
zarf package publish zarf-package-whisper-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-whisper-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/leapfrogai
zarf package publish zarf-package-whisper-amd64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
zarf package publish zarf-package-whisper-arm64-${{ steps.get_version.outputs.version-without-v }}.tar.zst oci://ghcr.io/defenseunicorns/packages/uds/leapfrogai
docker image prune -af
rm zarf-package-whisper-*.tar.zst
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ LeapfrogAI is built on top of [Unicorn Delivery Service (UDS)](https://github.co

## Structure

The LeapfrogAI repository follows a monorepo structure based around an [API](#api) with each of the [components](#components) included in a dedicated `packages` directory. The UDS bundles that handle the development and latest deployments of LeapfrogAI are in the `uds-bundles` directory. The structure looks as follows:
The LeapfrogAI repository follows a monorepo structure based around an [API](#api) with each of the [components](#components) included in a dedicated `packages` directory. The UDS bundles that handle the development and latest deployments of LeapfrogAI are in the `bundles` directory. The structure looks as follows:

```bash
leapfrogai/
Expand All @@ -69,7 +69,7 @@ leapfrogai/
│ ├── ui/ # deployment infrastructure for the UI
│ ├── vllm/ # source code & deployment infrastructure for the vllm backend
│ └── whisper/ # source code & deployment infrastructure for the whisper backend
├── uds-bundles/
├── bundles/
│ ├── dev/ # uds bundles for local uds dev deployments
│ └── latest/ # uds bundles for the most current uds deployments
├── Makefile
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,29 @@ packages:
# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# API
# OpenAI-like API
- name: leapfrogai-api
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Chat Model
# Model for generic chat and summarization
- name: llama-cpp-python
repository: ghcr.io/defenseunicorns/packages/leapfrogai/llama-cpp-python
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Text Embeddings Model
# Model for providing vector embeddings for text
- name: text-embeddings
repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Transcription Model
# Model for converting audio to text
- name: whisper
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
# UI
- name: leapfrogai-ui
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,29 @@ packages:
# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# OpenAI-like API
- name: leapfrogai-api
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Model for generic chat and summarization
- name: vllm
repository: ghcr.io/defenseunicorns/packages/leapfrogai/vllm
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Model for providing vector embeddings for text
- name: text-embeddings
repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# Model for converting audio to text
- name: whisper
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
# UI
- name: leapfrogai-ui
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
# x-release-please-start-version
ref: 0.11.0
# x-release-please-end
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ uds zarf package deploy zarf-package-*.tar.zst --confirm
3. Create the UDS bundle, modifying the `uds-config.yaml` as required:

```bash
cd uds-bundles/dev/<cpu or gpu>
cd bundles/dev/<cpu or gpu>
uds create . --confirm
```

4. Deploy the UDS bundle to an existing [UDS Kubernetes cluster](../packages/k3d-gpu/README.md):

```bash
cd uds-bundles/dev/<cpu or gpu>
cd bundles/dev/<cpu or gpu>
uds deploy <insert bundle name> --confirm
```

Expand Down
4 changes: 2 additions & 2 deletions website/content/en/docs/local-deploy-guide/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ If you already have a pre-built UDS bundle, please skip to [Deploying the UDS Bu

```bash
# For CPU-only
cd uds-bundles/latest/cpu/
cd bundles/latest/cpu/
uds create .
UDS_ARCH=amd64 uds deploy uds-bundle-leapfrogai-*.tar.zst --confirm
# For compatible AMD64, NVIDIA CUDA-capable GPU machines
cd uds-bundles/latest/gpu/
cd bundles/latest/gpu/
uds create .
UDS_ARCH=amd64 uds deploy uds-bundle-leapfrogai-*.tar.zst --confirm
```
Expand Down

0 comments on commit 985642a

Please sign in to comment.