mirror of
https://github.com/bitnami/charts.git
synced 2026-03-01 23:37:49 +08:00
Merge pull request #1208 from bitnami/mxnetChart
[bitnami/mxnet] Release MXNet chart
This commit is contained in:
@@ -55,6 +55,7 @@ $ helm search bitnami
|
||||
- [Kubeapps](https://github.com/bitnami/charts/tree/master/bitnami/kubeapps)
|
||||
- [Memcached](https://github.com/bitnami/charts/tree/master/bitnami/memcached)
|
||||
- [Metrics Server](https://github.com/bitnami/charts/tree/master/bitnami/metrics-server)
|
||||
- [MXNet](https://github.com/bitnami/charts/tree/master/bitnami/mxnet)
|
||||
- [MySQL](https://github.com/bitnami/charts/tree/master/bitnami/mysql)
|
||||
- [nginx](https://github.com/bitnami/charts/tree/master/bitnami/nginx)
|
||||
- [nginx-ingress-controller](https://github.com/bitnami/charts/tree/master/bitnami/nginx-ingress-controller)
|
||||
|
||||
22
bitnami/mxnet/.helmignore
Normal file
22
bitnami/mxnet/.helmignore
Normal file
@@ -0,0 +1,22 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
18
bitnami/mxnet/Chart.yaml
Normal file
18
bitnami/mxnet/Chart.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
name: mxnet
|
||||
version: 0.0.1
|
||||
appVersion: 1.4.1
|
||||
description: A flexible and efficient library for deep learning
|
||||
keywords:
|
||||
- mxnet
|
||||
- python
|
||||
- machine
|
||||
- learning
|
||||
home: https://mxnet.apache.org/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-mxnet
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/mxnet/img/mxnet-stack-110x117.png
|
||||
262
bitnami/mxnet/README.md
Normal file
262
bitnami/mxnet/README.md
Normal file
@@ -0,0 +1,262 @@
|
||||
# MXNet
|
||||
|
||||
[MXNet](https://mxnet.apache.org/) is a deep learning platform that accelerates the transition from research prototyping to production deployment. It is built for full integration into Python that enables you to use it with its libraries and main packages.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install bitnami/mxnet
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [MXNet](https://github.com/bitnami/bitnami-docker-mxnet) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of [Bitnami Kubernetes Production Runtime](https://kubeprod.io/) (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.8+ with Beta APIs enabled
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release bitnami/mxnet
|
||||
```
|
||||
|
||||
The command deploys MXNet on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the MinIO chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.registry` | MXNet image registry | `docker.io` |
|
||||
| `image.repository` | MXNet image name | `bitnami/MXNet` |
|
||||
| `image.tag` | MXNet image tag | `{VERSION}` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `git.registry` | Git image registry | `docker.io` |
|
||||
| `git.repository` | Git image name | `bitnami/git` |
|
||||
| `git.tag` | Git image tag | `latest` |
|
||||
| `git.pullPolicy` | Git image pull policy | `Always` |
|
||||
| `git.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `service.type` | Kubernetes service type | `ClusterIP` |
|
||||
| `entrypoint.file` | Main entrypoint to your application. If not speficied, it will be a `sleep infinity` command | `''` |
|
||||
| `entrypoint.args` | Args required by your entrypoint | `nil` |
|
||||
| `entrypoint.workDir` | Working directory for launching the entrypoint | `'/app'` |
|
||||
| `podManagementPolicy` | StatefulSet (worker and server nodes) pod management policy | `Parallel` |
|
||||
| `mode` | Run MXNet in standalone or distributed mode (possible values: `standalone`, `distributed`) | `standalone` |
|
||||
| `serverCount` | Number of server nodes that will execute your code | `1` |
|
||||
| `workerCount` | Number of worker nodes that will execute your code | `1` |
|
||||
| `schedulerPort` | MXNet scheduler port (only for distributed mode) | `49875` |
|
||||
| `configMap` | Config map that contains the files you want to load in MXNet | `nil` |
|
||||
| `cloneFilesFromGit.enabled` | Enable in order to download files from git repository | `false` |
|
||||
| `cloneFilesFromGit.repository` | Repository that holds the files | `nil` |
|
||||
| `cloneFilesFromGit.revision` | Revision from the repository to checkout | `master` |
|
||||
| `commonExtraEnvVars` | Extra environment variables to add to server, scheduler and worker nodes | `nil` |
|
||||
| `workerExtraEnvVars` | Extra environment variables to add to the worker nodes | `nil` |
|
||||
| `serverExtraEnvVars` | Extra environment variables to add to the server nodes | `nil` |
|
||||
| `schedulerExtraEnvVars` | Extra environment variables to add to the scheduler node | `nil` |
|
||||
| `sidecars` | Attach additional containers to the pods (scheduler, worker and server nodes) | `nil` |
|
||||
| `initContainers` | Attach additional init containers to the pods (scheduler, worker and server nodes) | `nil` |
|
||||
| `existingSecret` | Name of a secret with sensitive data to mount in the pods | `nil` |
|
||||
| `nodeSelector` | Node labels for pod assignment (this value is evaluated as a template) | `{}` |
|
||||
| `tolerations` | Toleration labels for pod assignment (this value is evaluated as a template) | `[]` |
|
||||
| `affinity` | Map of node/pod affinities (this value is evaluated as a template) | `{}` |
|
||||
| `resources` | Pod resources | `{}` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
| `livenessProbe.enabled` | Enable/disable the Liveness probe | `true` |
|
||||
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `5` |
|
||||
| `livenessProbe.periodSeconds` | How often to perform the probe | `5` |
|
||||
| `livenessProbe.timeoutSeconds` | When the probe times out | `5` |
|
||||
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
|
||||
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` |
|
||||
| `readinessProbe.enabled` | Enable/disable the Readiness probe | `true` |
|
||||
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
|
||||
| `readinessProbe.periodSeconds` | How often to perform the probe | `5` |
|
||||
| `readinessProbe.timeoutSeconds` | When the probe times out | `1` |
|
||||
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
|
||||
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` |
|
||||
| `persistence.enabled` | Use a PVC to persist data | `false` |
|
||||
| `persistence.mountPath` | Path to mount the volume at | `/bitnami/mxnet` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
| `persistence.annotations` | Persistent Volume annotations | `{}` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set mode=distributed \
|
||||
--set serverCount=2 \
|
||||
--set workerCount=3 \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
The above command creates 6 pods for MXNet: one scheduler, two servers, and three workers.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml bitnami/mxnet
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## Loading your files
|
||||
|
||||
The MXNet chart supports three different ways to load your files. In order of priority, they are:
|
||||
|
||||
1. Existing config map
|
||||
2. Files under the `files` directory
|
||||
3. Cloning a git repository
|
||||
|
||||
This means that if you specify a config map with your files, it won't look for the `files/` directory nor the git repository.
|
||||
|
||||
In order to use use an existing config map:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set configMap=my-config-map \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
To load your files from the `files/` directory you don't have to set any option. Just copy your files inside and don't specify a `ConfigMap`:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
Finally, if you want to clone a git repository:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set cloneFilesFromGit.enabled=true \
|
||||
--set cloneFilesFromGit.repository=https://github.com/my-user/my-repo \
|
||||
--set cloneFilesFromGit.revision=master \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
In case you want to add a file that includes sensitive information, pass a secret object using the `existingSecret` parameter. All the files in the secret will be mounted in the `/secrets` folder.
|
||||
|
||||
### Distributed training example
|
||||
|
||||
We will use the gluon example from the [MXNet official repository](https://github.com/apache/incubator-mxnet/tree/master/example/gluon). Launch it with the following command:
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set mode=distributed \
|
||||
--set cloneFilesFromGit.enabled=true \
|
||||
--set cloneFilesFromGit.repository=https://github.com/apache/incubator-mxnet.git \
|
||||
--set cloneFilesFromGit.revision=master \
|
||||
--set entrypoint.file=image_classification.py \
|
||||
--set entrypoint.args="--dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync" \
|
||||
--set entrypoint.workDir=/app/example/gluon/ \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
Check the logs of the worker node:
|
||||
|
||||
```console
|
||||
$ kubectl logs my-release-mxnet-worker-0 -f
|
||||
|
||||
INFO:root:Starting new image-classification task:, Namespace(batch_norm=False, batch_size=32, builtin_profiler=0, data_dir='', dataset='cifar10', dtype='float32', epochs=1, gpus='', kvstore='dist_sync', log_interval=50, lr=0.1, lr_factor=0.1, lr_steps='30,60,90', mode=None, model='vgg11', momentum=0.9, num_workers=4, prefix='', profile=False, resume='', save_frequency=10, seed=123, start_epoch=0, use_pretrained=False, use_thumbnail=False, wd=0.0001)
|
||||
INFO:root:downloaded http://data.mxnet.io/mxnet/data/cifar10.zip into data/cifar10.zip successfully
|
||||
[10:05:40] src/io/iter_image_recordio_2.cc:172: ImageRecordIOParser2: data/cifar/train.rec, use 1 threads for decoding..
|
||||
[10:05:45] src/io/iter_image_recordio_2.cc:172: ImageRecordIOParser2: data/cifar/test.rec, use 1 threads for decoding..
|
||||
```
|
||||
|
||||
If you want to increase the verbosity, set the environment variable `PS_VERBOSE=1` or `PS_VERBOSE=2` using the `commonEnvVars` value.
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set mode=distributed \
|
||||
--set cloneFilesFromGit.enabled=true \
|
||||
--set cloneFilesFromGit.repository=https://github.com/apache/incubator-mxnet.git \
|
||||
--set cloneFilesFromGit.revision=master \
|
||||
--set entrypoint.file=image_classification.py \
|
||||
--set entrypoint.args="--dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync" \
|
||||
--set entrypoint.workDir=/app/example/gluon/ \
|
||||
--set commonExtraEnvVars[0].name=PS_VERBOSE \
|
||||
--set commonExtraEnvVars[0].value=1 \
|
||||
bitnami/mxnet
|
||||
```
|
||||
|
||||
You will now see log entries in the scheduler and server nodes.
|
||||
|
||||
```console
|
||||
$ kubectl logs my-release-mxnet-server-0
|
||||
[14:22:53] src/van.cc:290: Bind to role=server, ip=10.32.0.12, port=57099, is_recovery=0
|
||||
[14:22:53] src/van.cc:238: S[10] is connected to others
|
||||
|
||||
$ kubectl logs my-release-mxnet-scheduler-67dbd4bb7c-px2wf
|
||||
[14:22:44] src/van.cc:290: Bind to role=scheduler, id=1, ip=10.32.0.11, port=9092, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=9 to node role=worker, ip=10.32.0.17, port=55423, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=11 to node role=worker, ip=10.32.0.16, port=60779, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=13 to node role=worker, ip=10.32.0.15, port=39817, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=15 to node role=worker, ip=10.32.0.14, port=48119, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=8 to node role=server, ip=10.32.0.13, port=56713, is_recovery=0
|
||||
[14:22:53] src/van.cc:56: assign rank=10 to node role=server, ip=10.32.0.12, port=57099, is_recovery=0
|
||||
[14:22:53] src/van.cc:83: the scheduler is connected to 4 workers and 2 servers
|
||||
[14:22:53] src/van.cc:183: Barrier count for 7 : 1
|
||||
[14:22:53] src/van.cc:183: Barrier count for 7 : 2
|
||||
[14:22:53] src/van.cc:183: Barrier count for 7 : 3
|
||||
[14:22:53] src/van.cc:183: Barrier count for 7 : 4
|
||||
...
|
||||
```
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami MXNet](https://github.com/bitnami/bitnami-docker-mxnet) image can persist data. If enabled, the persisted path is `/bitnami/mxnet` by default.
|
||||
|
||||
The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.
|
||||
|
||||
## Sidecars and Init Containers
|
||||
|
||||
If you have a need for additional containers to run within the same pod as MXNet (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
|
||||
|
||||
```yaml
|
||||
sidecars:
|
||||
- name: your-image-name
|
||||
image: your-image
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: portname
|
||||
containerPort: 1234
|
||||
```
|
||||
|
||||
Similarly, you can add extra init containers using the `initContainers` parameter.
|
||||
|
||||
```yaml
|
||||
initContainers:
|
||||
- name: your-image-name
|
||||
image: your-image
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: portname
|
||||
containerPort: 1234
|
||||
```
|
||||
45
bitnami/mxnet/templates/NOTES.txt
Normal file
45
bitnami/mxnet/templates/NOTES.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
{{- if or .Values.configMap (.Files.Glob "files/*") .Values.cloneFilesFromGit.enabled }}
|
||||
{{- if .Values.entrypoint.file }}
|
||||
The provided file {{ .Values.entrypoint.file }} is being executed. You can see the logs of each running node with:
|
||||
kubectl logs [POD_NAME]
|
||||
|
||||
and the list of pods:
|
||||
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
{{- else }}
|
||||
You didn't specify any entrypoint to your code.
|
||||
To run it, you can either re-deploy the chart using the `mxnet.entrypoint.file` option to specify your entrypoint, or execute it manually by jumping into the pods:
|
||||
|
||||
1. Get the running pods
|
||||
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
|
||||
2. Get into a pod
|
||||
kubectl exec -ti [POD_NAME] bash
|
||||
|
||||
3. Execute your script as you would normally do.
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
WARNING: You haven't loaded any file. You can access the Python REPL by jumping into the pods:
|
||||
|
||||
1. Get the running pods
|
||||
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
|
||||
2. Run the Python REPL
|
||||
kubectl exec -ti [POD_NAME] python3
|
||||
|
||||
This chart allows three different methods to load your files:
|
||||
|
||||
1. Load the files from an existing ConfigMap, using the `configMap` option.
|
||||
2. Putting your files in a `files` folder in the root of the Chart.
|
||||
3. Cloning a Git repository with the `cloneFilesFromGit` option.
|
||||
|
||||
Examples for the different methods can be found in the README (see https://github.com/bitnami/charts/blob/master/bitnami/mxnet/README.md).
|
||||
{{- end }}
|
||||
|
||||
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
|
||||
|
||||
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
|
||||
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{ include "mxnet.validateValues" . }}
|
||||
187
bitnami/mxnet/templates/_helpers.tpl
Normal file
187
bitnami/mxnet/templates/_helpers.tpl
Normal file
@@ -0,0 +1,187 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "mxnet.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "mxnet.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "mxnet.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper MXNet image name
|
||||
*/}}
|
||||
{{- define "mxnet.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of MXNet - number of workers must be greater than 0 */}}
|
||||
{{- define "mxnet.entrypoint" -}}
|
||||
{{- if .Values.entrypoint.file }}
|
||||
{{- if (.Values.entrypoint.file | regexFind "[.]py$") }}
|
||||
python3 {{ .Values.entrypoint.file }} {{ if .Values.entrypoint.args }}{{ .Values.entrypoint.args }}{{ end }}
|
||||
{{- else }}
|
||||
bash {{ .Values.entrypoint.file }} {{ if .Values.entrypoint.args }}{{ .Values.entrypoint.args }}{{ end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
sleep infinity
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper git image name
|
||||
*/}}
|
||||
{{- define "git.image" -}}
|
||||
{{- $registryName := .Values.git.registry -}}
|
||||
{{- $repositoryName := .Values.git.repository -}}
|
||||
{{- $tag := .Values.git.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "mxnet.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.git.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.git.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message, and call fail.
|
||||
*/}}
|
||||
{{- define "mxnet.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "mxnet.validateValues.mode" .) -}}
|
||||
{{- $messages := append $messages (include "mxnet.validateValues.workerCount" .) -}}
|
||||
{{- $messages := append $messages (include "mxnet.validateValues.serverCount" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of MXNet - must provide a valid mode ("distributed" or "standalone") */}}
|
||||
{{- define "mxnet.validateValues.mode" -}}
|
||||
{{- if and (ne .Values.mode "distributed") (ne .Values.mode "standalone") -}}
|
||||
mxnet: mode
|
||||
Invalid mode selected. Valid values are "distributed" and
|
||||
"standalone". Please set a valid mode (--set mode="xxxx")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of MXNet - number of workers must be greater than 0 */}}
|
||||
{{- define "mxnet.validateValues.workerCount" -}}
|
||||
{{- $replicaCount := int .Values.workerCount }}
|
||||
{{- if and (eq .Values.mode "distributed") (lt $replicaCount 1) -}}
|
||||
mxnet: workerCount
|
||||
Worker count must be greater than 0 in distributed mode!!
|
||||
Please set a valid worker count size (--set workerCount=X)
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "mxnet.parseEnvVars" -}}
|
||||
{{- range $env := . }}
|
||||
{{- if $env.value }}
|
||||
- name: {{ $env.name }}
|
||||
value: {{ $env.value | quote }}
|
||||
{{- else if $env.valueFrom }}
|
||||
- name: {{ $env.name }}
|
||||
valueFrom:
|
||||
{{ toYaml $env.valueFrom | indent 4 }}
|
||||
{{- else }} {{/* Leave this for future compatibility */}}
|
||||
-
|
||||
{{ toYaml $env | indent 2}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Validate values of MXNet - number of workers must be greater than 0 */}}
|
||||
{{- define "mxnet.validateValues.serverCount" -}}
|
||||
{{- $replicaCount := int .Values.serverCount }}
|
||||
{{- if and (eq .Values.mode "distributed") (lt $replicaCount 1) -}}
|
||||
mxnet: serverCount
|
||||
Server count must be greater than 0 in distributed mode!!
|
||||
Please set a valid worker count size (--set serverCount=X)
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
13
bitnami/mxnet/templates/configmap.yaml
Normal file
13
bitnami/mxnet/templates/configmap.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if .Files.Glob "files/*" }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-files
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/*").AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
26
bitnami/mxnet/templates/deployment-pvc.yaml
Normal file
26
bitnami/mxnet/templates/deployment-pvc.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- if .Values.persistence.enabled }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}{{ if eq .Values.mode "distributed" }}-scheduler{{ end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
17
bitnami/mxnet/templates/headless-svc.yaml
Normal file
17
bitnami/mxnet/templates/headless-svc.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- if eq .Values.mode "distributed" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-headless
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
158
bitnami/mxnet/templates/scheduler-deployment.yaml
Normal file
158
bitnami/mxnet/templates/scheduler-deployment.yaml
Normal file
@@ -0,0 +1,158 @@
|
||||
{{- if eq .Values.mode "distributed" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-scheduler
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: scheduler
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: scheduler
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: scheduler
|
||||
spec:
|
||||
{{- include "mxnet.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloneFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git clone {{ .Values.cloneFilesFromGit.repository }} --branch {{ .Values.cloneFilesFromGit.revision }} /app
|
||||
volumeMounts:
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- toYaml .Values.initContainers | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mxnet
|
||||
workingDir: {{ .Values.entrypoint.workDir }}
|
||||
image: {{ include "mxnet.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
{{- include "mxnet.entrypoint" . | nindent 10 }}
|
||||
env:
|
||||
- name: DMLC_ROLE
|
||||
value: "scheduler"
|
||||
- name: DMLC_NUM_WORKER
|
||||
value: {{ .Values.workerCount | quote }}
|
||||
- name: DMLC_NUM_SERVER
|
||||
value: {{ .Values.serverCount | quote }}
|
||||
- name: DMLC_PS_ROOT_URI
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: DMLC_PS_ROOT_PORT
|
||||
value: {{ .Values.schedulerPort | quote }}
|
||||
{{- if .Values.commonExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.commonExtraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.schedulerExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.schedulerExtraVars | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: mxnet
|
||||
containerPort: {{ .Values.schedulerPort }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: {{ .Values.schedulerPort }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: {{ .Values.schedulerPort }}
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
mountPath: /app
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
mountPath: /app
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
mountPath: /secrets
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- toYaml .Values.sidecars | nindent 6 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
secret:
|
||||
secretName: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
configMap:
|
||||
name: {{ .Values.configMap }}
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
configMap:
|
||||
name: {{ include "mxnet.fullname" . }}-files
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "mxnet.fullname" . }}-scheduler
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
22
bitnami/mxnet/templates/scheduler-service.yaml
Normal file
22
bitnami/mxnet/templates/scheduler-service.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- if eq .Values.mode "distributed" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-scheduler
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: scheduler
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.schedulerPort }}
|
||||
targetPort: mxnet
|
||||
name: mxnet
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: scheduler
|
||||
{{- end }}
|
||||
186
bitnami/mxnet/templates/server-statefulset.yml
Normal file
186
bitnami/mxnet/templates/server-statefulset.yml
Normal file
@@ -0,0 +1,186 @@
|
||||
{{- if eq .Values.mode "distributed" }}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-server
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: server
|
||||
replicas: {{ .Values.serverCount }}
|
||||
serviceName: {{ template "mxnet.fullname" . }}-headless
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
{{- include "mxnet.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloneFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git clone {{ .Values.cloneFilesFromGit.repository }} --branch {{ .Values.cloneFilesFromGit.revision }} /app
|
||||
volumeMounts:
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- toYaml .Values.initContainers | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mxnet
|
||||
workingDir: {{ .Values.entrypoint.workDir }}
|
||||
image: {{ include "mxnet.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
SERVER_RANK=${POD_NAME##*-}
|
||||
((SERVER_RANK++))
|
||||
export SERVER_RANK
|
||||
{{- include "mxnet.entrypoint" . | nindent 10 }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: DMLC_ROLE
|
||||
value: "server"
|
||||
- name: DMLC_NUM_WORKER
|
||||
value: {{ .Values.workerCount | quote }}
|
||||
- name: DMLC_NUM_SERVER
|
||||
value: {{ .Values.serverCount | quote }}
|
||||
- name: DMLC_PS_ROOT_URI
|
||||
value: {{ include "mxnet.fullname" . }}-scheduler
|
||||
- name: DMLC_PS_ROOT_PORT
|
||||
value: {{ .Values.schedulerPort | quote }}
|
||||
{{- if .Values.commonExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.commonExtraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serverExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.serverExtraVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import os; os.environ["DMLC_PS_ROOT_URI"] = "127.0.0.1"; os.environ["DMLC_ROLE"] = "worker"; import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import os; os.environ["DMLC_PS_ROOT_URI"] = "127.0.0.1"; os.environ["DMLC_ROLE"] = "worker"; import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
mountPath: /app
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
mountPath: /app
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
mountPath: /secrets
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- toYaml .Values.sidecars | nindent 6 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
secret:
|
||||
secretName: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
configMap:
|
||||
name: {{ .Values.configMap }}
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
configMap:
|
||||
name: {{ include "mxnet.fullname" . }}-files
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations: {{ toYaml .Values.persistence.annotations | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: {{ toYaml .Values.persistence.accessModes | nindent 8 }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- else }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
149
bitnami/mxnet/templates/standalone-deployment.yaml
Normal file
149
bitnami/mxnet/templates/standalone-deployment.yaml
Normal file
@@ -0,0 +1,149 @@
|
||||
{{- if eq .Values.mode "standalone" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: standalone
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: standalone
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: standalone
|
||||
spec:
|
||||
{{- include "mxnet.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloneFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git clone {{ .Values.cloneFilesFromGit.repository }} --branch {{ .Values.cloneFilesFromGit.revision }} /app
|
||||
volumeMounts:
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- toYaml .Values.initContainers | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mxnet
|
||||
workingDir: {{ .Values.entrypoint.workDir }}
|
||||
image: {{ include "mxnet.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
{{- include "mxnet.entrypoint" . | nindent 10 }}
|
||||
env:
|
||||
{{- if .Values.commonExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.commonExtraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: mxnet
|
||||
containerPort: {{ .Values.schedulerPort }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
mountPath: /app
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
mountPath: /app
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
mountPath: /secrets
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- toYaml .Values.sidecars | nindent 6 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
secret:
|
||||
secretName: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
configMap:
|
||||
name: {{ .Values.configMap }}
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
configMap:
|
||||
name: {{ include "mxnet.fullname" . }}-files
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "mxnet.fullname" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
186
bitnami/mxnet/templates/worker-statefulset.yml
Normal file
186
bitnami/mxnet/templates/worker-statefulset.yml
Normal file
@@ -0,0 +1,186 @@
|
||||
{{- if eq .Values.mode "distributed" }}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "mxnet.fullname" . }}-worker
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: worker
|
||||
spec:
|
||||
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||
serviceName: {{ template "mxnet.fullname" . }}-headless
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: worker
|
||||
replicas: {{ .Values.workerCount }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
helm.sh/chart: {{ include "mxnet.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: worker
|
||||
spec:
|
||||
{{- include "mxnet.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloneFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git clone {{ .Values.cloneFilesFromGit.repository }} --branch {{ .Values.cloneFilesFromGit.revision }} /app
|
||||
volumeMounts:
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- toYaml .Values.initContainers | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mxnet
|
||||
workingDir: {{ .Values.entrypoint.workDir }}
|
||||
image: {{ include "mxnet.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
WORKER_RANK=${POD_NAME##*-}
|
||||
((WORKER_RANK++))
|
||||
export WORKER_RANK
|
||||
{{- include "mxnet.entrypoint" . | nindent 10 }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: DMLC_ROLE
|
||||
value: "worker"
|
||||
- name: DMLC_NUM_WORKER
|
||||
value: {{ .Values.workerCount | quote }}
|
||||
- name: DMLC_NUM_SERVER
|
||||
value: {{ .Values.serverCount | quote }}
|
||||
- name: DMLC_PS_ROOT_URI
|
||||
value: {{ include "mxnet.fullname" . }}-scheduler
|
||||
- name: DMLC_PS_ROOT_PORT
|
||||
value: {{ .Values.schedulerPort | quote }}
|
||||
{{- if .Values.commonExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.commonExtraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.workerExtraEnvVars }}
|
||||
{{- include "mxnet.parseEnvVars" .Values.workerExtraVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- python3
|
||||
- -c
|
||||
- import mxnet; print(mxnet.__version__)
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
mountPath: /app
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
mountPath: /app
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
mountPath: /secrets
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- toYaml .Values.sidecars | nindent 6 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: secret-data
|
||||
secret:
|
||||
secretName: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.configMap }}
|
||||
- name: ext-files
|
||||
configMap:
|
||||
name: {{ .Values.configMap }}
|
||||
{{- else if .Files.Glob "files/*" }}
|
||||
- name: local-files
|
||||
configMap:
|
||||
name: {{ include "mxnet.fullname" . }}-files
|
||||
{{- else if .Values.cloneFilesFromGit.enabled }}
|
||||
- name: git-cloned-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "mxnet.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations: {{ toYaml .Values.persistence.annotations | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: {{ toYaml .Values.persistence.accessModes | nindent 8 }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- else }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
216
bitnami/mxnet/values-production.yaml
Normal file
216
bitnami/mxnet/values-production.yaml
Normal file
@@ -0,0 +1,216 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami MXNet image version
|
||||
## ref: https://hub.docker.com/r/bitnami/mxnet/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/mxnet
|
||||
tag: 1.4.1-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
##
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
debug: false
|
||||
|
||||
## Bitnami git image version
|
||||
## ref: https://hub.docker.com/r/bitnami/git/tags/
|
||||
##
|
||||
git:
|
||||
registry: docker.io
|
||||
repository: bitnami/git
|
||||
tag: 2.21.0-debian-9-r73
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Service for the scheduler node
|
||||
service:
|
||||
## Kubernetes service type, ClusterIP and NodePort are supported at present
|
||||
type: ClusterIP
|
||||
|
||||
## MXNet configuration
|
||||
##
|
||||
## The main entrypoint of your app, this will be executed as:
|
||||
## python [file] [args]
|
||||
entrypoint:
|
||||
file:
|
||||
workDir: /app
|
||||
#args:
|
||||
|
||||
## MXNet deployment mode. Can be `standalone` or `distributed`
|
||||
mode: distributed
|
||||
|
||||
## Number of server nodes (only for distributed mode)
|
||||
serverCount: 2
|
||||
|
||||
## Number of worker nodes (only for distributed mode)
|
||||
workerCount: 4
|
||||
|
||||
## Pointer a to a secret to mount sensitive data
|
||||
# existingSecret:
|
||||
|
||||
## The port used to communicate with the scheduler
|
||||
## MASTER_PORT will be set to this value
|
||||
##
|
||||
schedulerPort: 9092
|
||||
|
||||
## Name of an existing config map containing all the files you want to load in MXNet
|
||||
##
|
||||
#configMap:
|
||||
|
||||
## Enable in order to download files from git repository.
|
||||
##
|
||||
cloneFilesFromGit:
|
||||
enabled: false
|
||||
# repository:
|
||||
# revision: master
|
||||
|
||||
## Additional environment variables for all node types
|
||||
##
|
||||
# commonExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for worker nodes
|
||||
##
|
||||
# workerExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for server nodes
|
||||
##
|
||||
# serverExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for the scheduler node
|
||||
##
|
||||
# schedulerExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## StatefulSet pod management policy
|
||||
podManagementPolicy: Parallel
|
||||
|
||||
## Node labels for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Affinity for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Configure liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 15
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 15
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Data volume mount path
|
||||
##
|
||||
mountPath: /bitnami/mxnet
|
||||
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
sidecars:
|
||||
## Add sidecars to the pod.
|
||||
## e.g.
|
||||
# - name: your-image-name
|
||||
# image: your-image
|
||||
# imagePullPolicy: Always
|
||||
# ports:
|
||||
# - name: portname
|
||||
# containerPort: 1234
|
||||
|
||||
initContainers:
|
||||
## Add init containers to the pod.
|
||||
## e.g.
|
||||
# - name: your-image-name
|
||||
# image: your-image
|
||||
# imagePullPolicy: Always
|
||||
# ports:
|
||||
# - name: portname
|
||||
# containerPort: 1234
|
||||
216
bitnami/mxnet/values.yaml
Normal file
216
bitnami/mxnet/values.yaml
Normal file
@@ -0,0 +1,216 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami MXNet image version
|
||||
## ref: https://hub.docker.com/r/bitnami/mxnet/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/mxnet
|
||||
tag: 1.4.1-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
##
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
debug: false
|
||||
|
||||
## Bitnami git image version
|
||||
## ref: https://hub.docker.com/r/bitnami/git/tags/
|
||||
##
|
||||
git:
|
||||
registry: docker.io
|
||||
repository: bitnami/git
|
||||
tag: 2.21.0-debian-9-r73
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Service for the scheduler node
|
||||
service:
|
||||
## Kubernetes service type, ClusterIP and NodePort are supported at present
|
||||
type: ClusterIP
|
||||
|
||||
## MXNet configuration
|
||||
##
|
||||
## The main entrypoint of your app, this will be executed as:
|
||||
## python [file] [args]
|
||||
entrypoint:
|
||||
file:
|
||||
workDir: /app
|
||||
#args:
|
||||
|
||||
## MXNet deployment mode. Can be `standalone` or `distributed`
|
||||
mode: standalone
|
||||
|
||||
## Number of server nodes (only for distributed mode)
|
||||
serverCount: 1
|
||||
|
||||
## Number of worker nodes (only for distributed mode)
|
||||
workerCount: 1
|
||||
|
||||
## Pointer a to a secret to mount sensitive data
|
||||
# existingSecret:
|
||||
|
||||
## The port used to communicate with the scheduler
|
||||
## MASTER_PORT will be set to this value
|
||||
##
|
||||
schedulerPort: 9092
|
||||
|
||||
## Name of an existing config map containing all the files you want to load in MXNet
|
||||
##
|
||||
#configMap:
|
||||
|
||||
## Enable in order to download files from git repository.
|
||||
##
|
||||
cloneFilesFromGit:
|
||||
enabled: false
|
||||
# repository:
|
||||
# revision: master
|
||||
|
||||
## Additional environment variables for all node types
|
||||
##
|
||||
# commonExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for worker nodes
|
||||
##
|
||||
# workerExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for server nodes
|
||||
##
|
||||
# serverExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## Additional environment variables for the scheduler node
|
||||
##
|
||||
# schedulerExtraEnvVars:
|
||||
# - name: PS_VERBOSE
|
||||
# value: "1"
|
||||
|
||||
## StatefulSet pod management policy
|
||||
podManagementPolicy: Parallel
|
||||
|
||||
## Node labels for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Affinity for pod assignment (this value is evaluated as a template)
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Configure liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 15
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 15
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Data volume mount path
|
||||
##
|
||||
mountPath: /bitnami/mxnet
|
||||
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
sidecars:
|
||||
## Add sidecars to the pod.
|
||||
## e.g.
|
||||
# - name: your-image-name
|
||||
# image: your-image
|
||||
# imagePullPolicy: Always
|
||||
# ports:
|
||||
# - name: portname
|
||||
# containerPort: 1234
|
||||
|
||||
initContainers:
|
||||
## Add init containers to the pod.
|
||||
## e.g.
|
||||
# - name: your-image-name
|
||||
# image: your-image
|
||||
# imagePullPolicy: Always
|
||||
# ports:
|
||||
# - name: portname
|
||||
# containerPort: 1234
|
||||
Reference in New Issue
Block a user