Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding env to triton hypha #13

Merged
merged 23 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/helm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensure tags are fetched too

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.9.3

- name: Add Helm dependency repos
run: |
helm repo add docker-registry https://helm.twun.io
helm repo add minio https://charts.min.io/
helm repo add redis https://charts.bitnami.com/bitnami

- name: update and build Helm dependency repos
run: |
helm dependency update charts/hypha
helm dependency build charts/hypha

15 changes: 10 additions & 5 deletions .github/workflows/helm-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,22 @@ jobs:
# 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
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Install chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.6.0

- 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
# # 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
9 changes: 4 additions & 5 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Release Charts

on:
push:
branches:
- main
- dev
tags:
- '*'

jobs:
release:
Expand All @@ -24,8 +23,8 @@ jobs:

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.9.3
# with:
# version: v3.9.3

- name: Add Helm dependency repos
run: |
Expand Down
6 changes: 3 additions & 3 deletions charts/hypha/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ dependencies:
version: 3.3.0
- name: tritoninferenceserver-hypha
repository: file://../tritoninferenceserver-hypha
version: 1.0.7
version: 1.0.8
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.11.6
digest: sha256:71a65bfbce59f1f2a3284ea4609953afd68a07856c039442322110994c89c85e
generated: "2023-10-12T16:33:20.113826467+01:00"
digest: sha256:b90885b4f0e308df8a24acea623406553c8e341bf552f215440d2e38a0e3ad24
generated: "2023-11-09T07:50:01.464175358Z"
66 changes: 33 additions & 33 deletions charts/hypha/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,42 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.16.3
version: 0.16.8
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.15.25
appVersion: 0.15.35
dependencies:
- name: docker-registry
# condition: docker-registry-mirror.enabled
version: 2.1.0
repository: https://helm.twun.io
condition: docker-registry.enabled
- name: minio
version: 3.3.0
repository: https://charts.min.io/
condition: minio.enabled
# - name: tritoninferenceserver
# repository: https://helm.ngc.nvidia.com/nvidia
# version: 1.0.0
# condition: tritoninferenceserver.enabled
# - name: cert-manager
# version: v1.4.2
# repository: https://charts.jetstack.io/
# condition: cert-manager.enabled
# - name: ingress-nginx
# version: 3.35.0
# repository: https://kubernetes.github.io/ingress-nginx
# condition: ingress-nginx.enabled
- name: tritoninferenceserver-hypha
repository: "file://../tritoninferenceserver-hypha"
version: 1.0.7
condition: tritoninferenceserver-hypha.enabled
- name: redis
repository: "https://charts.bitnami.com/bitnami"
version: 17.11.6
condition: redis.enabled
- name: docker-registry
# condition: docker-registry-mirror.enabled
version: 2.1.0
repository: https://helm.twun.io
condition: docker-registry.enabled
- name: minio
version: 3.3.0
repository: https://charts.min.io/
condition: minio.enabled
# - name: tritoninferenceserver
# repository: https://helm.ngc.nvidia.com/nvidia
# version: 1.0.0
# condition: tritoninferenceserver.enabled
# - name: cert-manager
# version: v1.4.2
# repository: https://charts.jetstack.io/
# condition: cert-manager.enabled
# - name: ingress-nginx
# version: 3.35.0
# repository: https://kubernetes.github.io/ingress-nginx
# condition: ingress-nginx.enabled
- name: tritoninferenceserver-hypha
repository: "file://../tritoninferenceserver-hypha"
version: 1.0.8
condition: tritoninferenceserver-hypha.enabled
- name: redis
repository: "https://charts.bitnami.com/bitnami"
version: 17.11.6
condition: redis.enabled
maintainers:
- name: ctr26
- name: oeway
- name: ctr26
- name: oeway
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions charts/hypha/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ spec:
--endpoint-url-public={{ $S3_ENDPOINT_URL_PUBLIC }} \
--access-key-id={{ $S3_ACCESS_KEY }} \
--secret-access-key={{ $S3_SECRET_KEY }} \
--executable-path={{ .Values.executablePath }}
--executable-path={{ .Values.executablePath }} \
--enable-server-apps \
--apps-dir={{ .Values.appsDir }} \
--public-base-url={{ .Values.imjoyHostName }} \
--public-base-url={{ .Values.hyphaHostName }} \
# --reset-redis \
# --startup-functions={{ .Values.startupFunctionsPath }}:hypha_startup \
# --in-docker \
Expand Down
Empty file.
Empty file.
53 changes: 25 additions & 28 deletions charts/hypha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# Declare variables to be passed into your templates.
replicaCount: 1
acmeEmail: ""
certSecretName: imjoy-app-engine-tls
imjoyHostName: https://hypha.imjoy.io
s3ConsoleHostName: https://hs3c.imjoy.io
s3_endpoint_url_public: https://hs3.imjoy.io
certSecretName: hypha-tls
hyphaHostName: https://hypha.local
s3ConsoleHostName: https://hs3c.local
s3_endpoint_url_public: https://hs3.local
# s3_endpoint_url: ""
auth0_audience: https://imjoy.eu.auth0.com/api/v2/
auth0_domain: imjoy.eu.auth0.com
auth0_audience: ""
auth0_domain: ""
jwt_secret: "xZ/aDcP+PfoTWgwA9ZADTtU/+djwMeMKz4QlSKRcgEs="

# TODO
Expand All @@ -22,7 +22,7 @@ executablePath: /home/bin
image:
repository: ghcr.io/amun-ai/hypha
pullPolicy: IfNotPresent
tag: "0.15.25"
tag: "0.15.35"

triton_url: "http://tritoninferenceserver.tritoninferenceserver.svc.cluster.local:8000"

Expand All @@ -37,12 +37,10 @@ ingress:
path: /
# Used to create an Ingress record.
hosts:
- imjoy.duckdns.org
# - hypha.imjoy.io
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
- ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
labels: {}
# tls:
# Secrets must be manually created in the namespace.
Expand Down Expand Up @@ -72,7 +70,7 @@ minio:
fullnameOverride: "minio"
enabled: true
rootUser: "minio"
rootPassword: "minio123"
rootPassword: "xZ/aDcP+PfoTWgwA9ZADTtU/+djwMeMKz4QlSKRcgEs="
publicEndpointUrl: ""
browserRedirectUrl: ""

Expand Down Expand Up @@ -102,18 +100,18 @@ tritoninferenceserver-hypha:
# s3Endpoint: https://uk1s3.embassy.ebi.ac.uk
# s3Bucket: s3://model-repository/
env:
- name: TF_FORCE_GPU_ALLOW_GROWTH
value: "true"
- name: AWS_ACCESS_KEY_ID
value: minio
- name: AWS_SECRET_ACCESS_KEY
value: minio123
- name: AWS_REGION
value: us-east-1
- name: S3_ENDPOINT
value: "http://minio:9000"
- name: S3_USE_HTTPS
value: "0"
- name: TF_FORCE_GPU_ALLOW_GROWTH
value: "true"
- name: AWS_ACCESS_KEY_ID
value: minio
- name: AWS_SECRET_ACCESS_KEY
value: "xZ/aDcP+PfoTWgwA9ZADTtU/+djwMeMKz4QlSKRcgEs="
- name: AWS_REGION
value: us-east-1
- name: S3_ENDPOINT
value: "http://minio:9000"
- name: S3_USE_HTTPS
value: "0"
ingress:
enabled: false
# resources:
Expand Down Expand Up @@ -145,5 +143,4 @@ tritoninferenceserver-hypha:
gpuUtilization: 50
gpuMemoryUtilization: 50

nodeSelector:
cloud.google.com/gke-accelerator: "nvidia-tesla-t4"
nodeSelector: {}
6 changes: 3 additions & 3 deletions charts/tritoninferenceserver-hypha/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.7
version: 1.0.8

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -24,5 +24,5 @@ version: 1.0.7
appVersion: 21.10-py3

maintainers:
- name: ctr26
- name: oeway
- name: ctr26
- name: oeway
22 changes: 17 additions & 5 deletions charts/tritoninferenceserver-hypha/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,24 @@ spec:
volumeMounts:
- mountPath: /dev/shm
name: dshm
- mountPath: {{ .Values.image.modelRepositoryPath }}
name: model-repository
- mountPath: {{ .Values.image.modelSnapshotsPath }}
name: model-snapshots
- mountPath: /opt/tritonserver/caches
name: triton-cache
subPath: caches
- mountPath: /model-repository
name: triton-cache
subPath: model-repository
- mountPath: /model-snapshots
name: triton-cache
subPath: model-snapshots
- mountPath: /tmp
name: triton-cache
subPath: tmp
env:
- name: TF_FORCE_GPU_ALLOW_GROWTH
value: "true"
{{ toYaml .Values.image.env | indent 12 }}
# - name: MODEL_SNAPSHOTS_DIRECTORY
# value: "{{ .Values.image.modelSnapshotsPath }}"
imagePullPolicy: IfNotPresent
# TODO Fix probe checks
# livenessProbe:
Expand Down Expand Up @@ -93,4 +103,6 @@ spec:
- name: model-repository
emptyDir: {}
- name: model-snapshots
emptyDir: {}
emptyDir: {}
- name: triton-cache
{{ toYaml .Values.cache | indent 10 }}
12 changes: 0 additions & 12 deletions charts/tritoninferenceserver-hypha/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# apiVersion: v1
# kind: Service
# metadata:
# name: tritoninferenceserver
# spec:
# selector:
# app: tritoninferenceserver
# ports:
# - protocol: TCP
# port: 8000
# targetPort: 8000

apiVersion: v1
kind: Service
metadata:
Expand Down
Loading
Loading