From 4540a78a1a63212d281e1700789f39a0bd17e591 Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 01:53:05 +0200 Subject: [PATCH 1/6] Remove docker volumes --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0dcc84f..b26f691 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -56,9 +56,9 @@ RUN \ && chown -R ${USERNAME} ${DATASETS_DIR} ${TRAINING_DIR} ${INFERENCE_DIR} # Declare data volumes -VOLUME ["${DATASETS_DIR}"] -VOLUME ["${INFERENCE_DIR}"] -VOLUME ["${TRAINING_DIR}"] +#VOLUME ["${DATASETS_DIR}"] +#VOLUME ["${INFERENCE_DIR}"] +#VOLUME ["${TRAINING_DIR}"] # Set the default user USER ${USERNAME} From 04cf55311d1ecb2ffc1f5d67963c3aa5506a3eb1 Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 02:03:11 +0200 Subject: [PATCH 2/6] Add helper to check GPU use --- k8s/deephealth-backend/templates/_helpers.tpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/k8s/deephealth-backend/templates/_helpers.tpl b/k8s/deephealth-backend/templates/_helpers.tpl index ceb80f3..9306d98 100644 --- a/k8s/deephealth-backend/templates/_helpers.tpl +++ b/k8s/deephealth-backend/templates/_helpers.tpl @@ -157,6 +157,21 @@ Define mount paths for shared volumes variables in connection between some pods. mountPath: {{ .Values.backend.persistence.data.path }} {{- end -}} +{{/* +Check if using GPU resources. +*/}} +{{- define "deephealth-backend.gpu-enabled" -}} +{{- if .Values.backend.resources -}} +{{- if hasKey .Values.backend.resources.limits "nvidia.com/gpu" -}} +{{- printf "true" -}} +{{- else -}} +{{- printf "false" -}} +{{- end -}} +{{- else -}} +{{- printf "false" -}} +{{- end -}} +{{- end -}} + {{/* Define shared volumes in connection between some pods. From c0da1d46d1830f36dd906a3262f8b37ef93ae260 Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 02:04:43 +0200 Subject: [PATCH 3/6] Inject EDDL_WITH_CUDA flag into the backend configuration --- k8s/deephealth-backend/templates/secrets.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/k8s/deephealth-backend/templates/secrets.yaml b/k8s/deephealth-backend/templates/secrets.yaml index 34b762b..4668937 100644 --- a/k8s/deephealth-backend/templates/secrets.yaml +++ b/k8s/deephealth-backend/templates/secrets.yaml @@ -25,6 +25,9 @@ stringData: # Allow DEBUG mode. Don't run with debug turned on in production! DEBUG={{ .Values.global.debug }} + # Enable eddl CS_GPU computing service + EDDL_WITH_CUDA={{ include "deephealth-backend.gpu-enabled" . }} + # Set SECRET_KEY. Keep the secret key used in production secret! SECRET_KEY={{ include "deephealth-backend.djangoSecretKey" . }} From 9a44eff0d9d8cac1b0c306d2fe7c3fd478a8c78e Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 02:08:33 +0200 Subject: [PATCH 4/6] Update default image --- README.md | 2 +- k8s/deephealth-backend/values.yaml | 2 +- k8s/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a94afe5..e71f2d3 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ The following tables lists the main configurable parameters of the `deephealth-b | `ingress.annations` | Annotations for the ingress realated with the API Endpoint service | `kubernetes.io/ingress.class: nginx` | | `ingress.hosts` | Hosts paths for the ingress realated with the API Endpoint service (see example) | `nil` | | `backend.image.repository` | Back-end App Docker Image | `dhealth/backend` | -| `backend.image.tag` | Back-end App Docker Image Tag | `b8ee98c` | +| `backend.image.tag` | Back-end App Docker Image Tag | `2fd828d8` | | `backend.admin.username` | Username of the administrator of the backend app | `admin` | | `backend.admin.password` | Password of the administrator of the backend app (autogenerated if not defined) | `nil` | | `backend.admin.email` | Email of the administrator of the backend app | `nil` | diff --git a/k8s/deephealth-backend/values.yaml b/k8s/deephealth-backend/values.yaml index 45476d9..72b5f05 100644 --- a/k8s/deephealth-backend/values.yaml +++ b/k8s/deephealth-backend/values.yaml @@ -62,7 +62,7 @@ backend: image: &backend_image repository: dhealth/backend - tag: b8ee98c + tag: 2fd828d8 pullPolicy: *imagePullPolicy service: diff --git a/k8s/values.yaml b/k8s/values.yaml index 0c26cb4..c62adc6 100644 --- a/k8s/values.yaml +++ b/k8s/values.yaml @@ -48,7 +48,7 @@ backend: image: &backend_image # repository: dhealth/backend - tag: b8ee98c + tag: 2fd828d8 # service: # type: NodePort From 14219b2bcff6d1cce44841f72294e87f1023c934 Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 02:09:25 +0200 Subject: [PATCH 5/6] Update app version number --- k8s/deephealth-backend/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/deephealth-backend/Chart.yaml b/k8s/deephealth-backend/Chart.yaml index e0caa12..9cfc665 100644 --- a/k8s/deephealth-backend/Chart.yaml +++ b/k8s/deephealth-backend/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "b8ee98c" +appVersion: "2fd828d8" description: A Helm chart for Kubernetes name: deephealth-backend version: 0.1.1 From 86239c546dfaf9744d0c7425d47bc9827c08d41e Mon Sep 17 00:00:00 2001 From: Marco Enrico Piras Date: Tue, 28 Apr 2020 02:09:52 +0200 Subject: [PATCH 6/6] Bump chart version to 0.1.2 --- k8s/deephealth-backend/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/deephealth-backend/Chart.yaml b/k8s/deephealth-backend/Chart.yaml index 9cfc665..5e6cd75 100644 --- a/k8s/deephealth-backend/Chart.yaml +++ b/k8s/deephealth-backend/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "2fd828d8" description: A Helm chart for Kubernetes name: deephealth-backend -version: 0.1.1 +version: 0.1.2