diff --git a/README.md b/README.md index d449509..ad14ed8 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/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} diff --git a/k8s/deephealth-backend/Chart.yaml b/k8s/deephealth-backend/Chart.yaml index e0caa12..5e6cd75 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 +version: 0.1.2 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. 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" . }} 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