-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor web-app structure and add chart and CI tests
- Loading branch information
Showing
24 changed files
with
379 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Test pull request | ||
on: | ||
pull_request: | ||
jobs: | ||
chart_validation: | ||
runs-on: ubuntu-latest | ||
env: | ||
CLUSTER_NAME: chart-testing | ||
RELEASE_NAME: ci-test | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
|
||
- name: Set up chart testing | ||
uses: helm/chart-testing-action@v2 | ||
|
||
- name: Run chart linting | ||
run: ct lint --config ct.yaml | ||
|
||
- name: Run helm template with default values | ||
run: helm template ci-test . | ||
working-directory: chart | ||
|
||
- name: Build all web app images | ||
run: ./build.sh | ||
working-directory: web-apps | ||
|
||
- name: Create Kind Cluster | ||
uses: helm/kind-action@v1 | ||
with: | ||
cluster-name: ${{ env.CLUSTER_NAME }} | ||
|
||
- name: Load local docker images into kind cluster | ||
run: | | ||
IMAGE_NAMES=$(docker image ls | grep ghcr.io/stackhpc/azimuth-llm- | awk '{print $1}') | ||
kind load docker-image $IMAGE_NAMES -n ${{ env.CLUSTER_NAME }} | ||
- name: Add Helm repos for dependencies | ||
run: | | ||
helm repo add stakater https://stakater.github.io/stakater-charts | ||
# https://github.com/helm/charts/blob/master/test/README.md#providing-custom-test-values | ||
# Each chart/ci/*-values.yaml file will be treated as a separate test case with it's | ||
# own helm install/test process. | ||
- name: Run chart install and test | ||
run: ct install --config ct.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
apiVersion: v2 | ||
name: azimuth-llm | ||
description: HuggingFace LLM model serving along with a simple web interface. | ||
maintainers: | ||
- name: "Scott Davidson" | ||
email: [email protected] | ||
url: https://github.com/sd109 | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
|
@@ -32,4 +36,4 @@ dependencies: | |
- name: reloader | ||
version: 1.0.63 | ||
repository: https://stakater.github.io/stakater-charts | ||
condition: ui.enabled | ||
condition: ui.enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
api: | ||
enabled: false | ||
ui: | ||
image: | ||
repository: ghcr.io/stackhpc/azimuth-llm-chat-interface | ||
tag: latest | ||
imagePullPolicy: Never | ||
service: | ||
zenith: | ||
enabled: false | ||
appSettings: | ||
hf_model_name: AMead10/c4ai-command-r-08-2024-awq | ||
backend_url: https://llm3-compute.cms.hu-berlin.de |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{- if .Values.api.enabled -}} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: gradio-client-response | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: gradio-client-test | ||
image: ghcr.io/stackhpc/azimuth-llm-chat-interface | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- python | ||
- gradio-client-test.py | ||
- http://{{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc | ||
restartPolicy: Never | ||
# Allow plenty of retries since downloading | ||
# model weights can take a long time. | ||
backoffLimit: 10 | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if not .Values.api.enabled -}} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: web-app-liveness | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: web-app-test | ||
image: nicolaka/netshoot:v0.12 | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- nc | ||
- -vz | ||
- {{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc | ||
- "80" | ||
restartPolicy: Never | ||
backoffLimit: 3 | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.