-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from amun-ai/dev
Dev
- Loading branch information
Showing
25 changed files
with
240 additions
and
197 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# See https://github.com/helm/chart-testing-action | ||
name: Lint and Test Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# k8s: ["1.19.16", "1.21.14", "1.22.9", "1.23.12", "1.24.7", "1.25.2"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/[email protected] | ||
# as of 2022/12 the set-output still not fixed in this action | ||
# https://github.com/Azure/setup-helm/issues/103 | ||
with: | ||
version: v3.7.0 | ||
|
||
- name: Install chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --config ct.yaml | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
|
||
# See https://github.com/helm/chart-testing/blob/main/doc/ct_install.md | ||
- name: Run chart-testing (install) | ||
run: ct install --config ct.yaml --debug |
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 |
---|---|---|
|
@@ -4,19 +4,18 @@ on: | |
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
release: | ||
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | ||
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
fetch-depth: 0 # Ensure tags are fetched too | ||
|
||
- name: Configure Git | ||
run: | | ||
|
@@ -27,10 +26,7 @@ jobs: | |
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.9.3 | ||
# https://hoetker.engineer/post/helm-github-workflow-dependency/ | ||
# This is bad practise, but it works for now. Chart-releaser | ||
# should add the helm repos but doesn't | ||
#TODO fix hard coding | ||
|
||
- name: Add Helm dependency repos | ||
run: | | ||
helm repo add docker-registry https://helm.twun.io | ||
|
@@ -41,7 +37,22 @@ jobs: | |
run: | | ||
helm dependency update charts/hypha | ||
helm dependency build charts/hypha | ||
- name: Get semantic version | ||
id: semver | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Update Chart.yaml version | ||
# uses: fjogeleit/[email protected] | ||
# with: | ||
# valueFile: 'charts/hypha/Chart.yaml' | ||
# propertyPath: 'version' | ||
# value: ${{ steps.semver.outputs.new_tag }} | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
VERSION: "${{ steps.semver.outputs.new_tag }}" |
This file was deleted.
Oops, something went wrong.
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,2 +1,8 @@ | ||
secrets.yaml | ||
.history | ||
/* | ||
!.gitignore | ||
!Makefile | ||
!README.md | ||
# !helmsman.yaml | ||
!charts | ||
!.github | ||
!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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
File renamed without changes.
Empty file.
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,33 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-test-script | ||
data: | ||
test-hypha.py: | | ||
import subprocess | ||
subprocess.call(["pip", "install", "pyotritonclient", "kaibu-utils","numpy","Pillow"]) | ||
import io | ||
from PIL import Image | ||
# import matplotlib.pyplot as plt | ||
# import numpy as np | ||
from pyotritonclient import execute | ||
from kaibu_utils import fetch_image | ||
import asyncio | ||
async def main(): | ||
image = await fetch_image("https://static.imjoy.io/img/img02.png") | ||
image = image.astype("float32") | ||
print("example image downloaded: ", image.shape) | ||
param = {"diameter": 30, "model_type": "cyto"} | ||
# run inference | ||
results = await execute([image.transpose(2, 0, 1), param], | ||
server_url="http://{{ include "hypha.fullname" . }}/triton", | ||
model_name="cellpose-python", | ||
decode_bytes=True) | ||
mask = results["mask"] | ||
print("cellpose prediction: ", mask.shape) | ||
if __name__ == "__main__": | ||
asyncio.run(main()) |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: "{{ .Release.Name }}-hypha-test" | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
annotations: | ||
"helm.sh/hook": test-success | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: hypha-test | ||
image: python:3.8-slim | ||
command: ["python", "/scripts/test-hypha.py"] | ||
volumeMounts: | ||
- name: test-script | ||
mountPath: /scripts | ||
restartPolicy: Never | ||
volumes: | ||
- name: test-script | ||
configMap: | ||
name: {{ .Release.Name }}-test-script |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.