# Horovod Helm Chart
## Introduction
This chart bootstraps Horovod which is a Distributed TensorFlow Framework on a Kubernetes cluster using the Helm Package Manager. It deploys Horovod workers as statefulsets, and the Horovod driver as a job, then discover the host list automatically.
## Prerequisites
- Kubernetes cluster v1.8+
## Build Docker Image
You can download [official Horovod Dockerfile](https://github.com/horovod/horovod/blob/master/docker/horovod/Dockerfile), then modify it according to your requirement, e.g. select a different CUDA, TensorFlow or Python version.
```
# mkdir horovod-docker
# wget -O horovod-docker/Dockerfile https://raw.githubusercontent.com/horovod/horovod/master/docker/horovod/Dockerfile
# docker build -t horovod:latest horovod-docker
```
## Prepare ssh keys
```
# Setup ssh key
export SSH_KEY_DIR=`mktemp -d`
cd $SSH_KEY_DIR
yes | ssh-keygen -N "" -f id_rsa
```
## Create the values.yaml
To run Horovod with GPU, you can create `values.yaml` like below
```
# cat << EOF > ~/values.yaml
---
ssh:
useSecrets: true
hostKey: |-
$(cat $SSH_KEY_DIR/id_rsa | sed 's/^/ /g')
hostKeyPub: |-
$(cat $SSH_KEY_DIR/id_rsa.pub | sed 's/^/ /g')
resources:
limits:
nvidia.com/gpu: 1
requests:
nvidia.com/gpu: 1
worker:
number: 2
image:
repository: horovod/horovod
tag: 0.24.3
driver:
image:
repository: horovod/horovod
tag: 0.24.3
args:
- "mpirun -np 3 --hostfile /horovod/generated/hostfile --mca orte_keep_fqdn_hostnames t --allow-run-as-root --display-map --tag-output --timestamp-output sh -c 'python /examples/tensorflow_mnist.py'"
EOF
```
For most cases, the overlay network impacts the Horovod performance greatly, so we should apply `Host Network` solution. To run Horovod with Host Network and GPU, you can create `values.yaml` like below
```
# cat << EOF > ~/values.yaml
---
+useHostNetwork: true
ssh:
useSecrets: true
port: 32222
hostKey: |-
$(cat $SSH_KEY_DIR/id_rsa | sed 's/^/ /g')
hostKeyPub: |-
$(cat $SSH_KEY_DIR/id_rsa.pub | sed 's/^/ /g')
resources:
limits:
nvidia.com/gpu: 1
requests:
nvidia.com/gpu: 1
worker:
number: 2
image:
repository: horovod/horovod
tag: 0.24.3
driver:
image:
repository: horovod/horovod
tag: 0.24.3
args:
- "mpirun -np 3 --hostfile /horovod/generated/hostfile --mca orte_keep_fqdn_hostnames t --allow-run-as-root --display-map --tag-output --timestamp-output sh -c 'python /examples/tensorflow_mnist.py'"
EOF
```
> notice: the difference is that you should set `useHostNetwork` as true, then set another ssh port rather than `22`
## Installing the Chart
To install the chart with the release name `mnist`:
```bash
$ helm install --values ~/values.yaml mnist stable/horovod
```
## Uninstalling the Chart
To uninstall/delete the `mnist` deployment:
```bash
$ helm delete mnist
```
The command removes all the Kubernetes components associated with the chart and
deletes the release.
## Upgrading an existing Release to a new major version
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
incompatible breaking change needing manual actions.
### 1.0.0
This version removes the `chart` label from the `spec.selector.matchLabels`
which is immutable since `StatefulSet apps/v1beta2`. It has been inadvertently
added, causing any subsequent upgrade to fail. See https://github.com/helm/charts/issues/7726.
In order to upgrade, delete the Horovod StatefulSet before upgrading, supposing your Release is named `my-release`:
```bash
$ kubectl delete statefulsets.apps --cascade=false my-release
```
## Configuration
The following table lists the configurable parameters of the Horovod
chart and their default values.
| Parameter | Description | Default |
|-----------|-------------|---------|
| `useHostNetwork` | Host network | `false` |
| `ssh.port` | The ssh port | `22` |
| `ssh.useSecrets` | Determine if using the secrets for ssh | `false` |
| `worker.number`| The worker's number | `5` |
| `worker.image.repository` | horovod worker image | `horovod/horovod` |
| `worker.image.pullPolicy` | `pullPolicy` for the worker | `IfNotPresent` |
| `worker.image.tag` | `tag` for the worker | `0.24.3` |
| `resources`| pod resource requests & limits| `{}`|
| `worker.env` | worker's environment variables | `{}` |
| `driver.image.repository` | horovod driver image | `horovod/horovod` |
| `driver.image.tag` | `tag` for the driver | `0.24.3` |
| `driver.image.pullPolicy` | image pullPolicy for the driver image| `IfNotPresent` |
| `driver.args` | driver's args | `{}` |
| `driver.env` | driver's environment variables | `{}` |
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Horovod是针对TensorFlow,Keras,PyTorch和Apache MXNet的分布式深度学习培训框架。Horovod的目标是使分布式深度学习快速且易于使用。 Horovod由LF AI和数据基金会(LF AI&Data)托管。如果您是一家致力于在人工智能,机器和深度学习中使用开源技术的公司,并希望在这些领域中支持开源项目的社区,请考虑加入LF AI和数据基金会。有关谁参与以及Horovod如何扮演角色的详细信息,请阅读Linux Foundation公告。
资源推荐
资源详情
资源评论




























收起资源包目录





































































































共 515 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论


酷爱码
- 粉丝: 9997
- 资源: 2114

下载权益

C知道特权

VIP文章

课程特权

开通VIP
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 84105929555134世界网络收音机 .apk
- 【毕业设计】基于Python的Django-html人脸表情的分类算法的设计源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 中移铁通操作手册.docx
- 【毕业设计】基于Python的Django-html人信息管理系统及安全策略分析系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 狮子座12025年一定要.txt
- 【毕业设计】基于Python的Django-html深度学习文本相似度检测系统(bert)源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html深度学习的web端多格式纠错系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html图像取证技术研究与实现系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html手写数字识别系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 2025误差理论作业参考.zip
- 【毕业设计】基于Python的Django-html图像去雾算法研究系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html图像信息隐藏技术设计源码(完整前后端+mysql+说明文档+LW+PPT).zip
- esp32配置 light-sleep 和 adc button 运行一段时间后系统重启
- 龙岩市乡镇边界,shp格式
- 宁德市乡镇边界,shp格式
- 景德镇市乡镇边界,shp格式
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
