Dask调度库的Apache Mesos后端
项目描述
[](http://52.0.47.203:8000/lensacom/dask.mesos)
[](https://gitter.im/lensacom/dask.mesos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[Apache Mesos](http://mesos.apache.org/)后端为[Dask](https://github.com/dask/dask)调度库。
在您的Mesos集群上运行分布式Python Dask工作流。
## 突出功能
- 在Docker容器中分布式运行任务
- 每个任务指定资源需求
- 二进制打包以优化资源利用率
## 安装
**先决条件**: [satyr](https://github.com/lensacom/satyr), [dask](https://github.com/dask/dask.git), [toolz](https://pypi.python.org/pypi/toolz)。所有这些都应该使用以下命令安装
`pip install dask.mesos` 或使用 [lensa/dask.mesos](https://hub.docker.com/r/lensa/dask.mesos/) Docker镜像
配置
- `MESOS_MASTER=zk://127.0.0.1:2181/mesos`
- `ZOOKEEPER_HOST=127.0.0.1:2181`
## 示例
```python
from __future__ import absolute_import, division, print_function
from dask_mesos import mesos, MesosExecutor
@mesos(cpus=0.1, mem=64)
def add(x, y)
"""在Mesos上使用指定的资源运行add"""
return x + y
@mesos(cpus=0.3, mem=128, image='lensa/dask.mesos')
def mul(x, y)
"""在指定的Docker镜像中运行mul"""
return x * y
with MesosExecutor(name='dask') as executor
"""此上下文处理Mesos调度器的生命周期"""
a, b = 23, 89
alot = add(a, b)
gigalot = mul(alot, add(10, 2))
gigalot.compute(get=executor.get) # (a + b) * (10 + 2)
executor.compute([alot, gigalot]) # future列表
```
## 配置dask.mesos任务
您可以在装饰器中配置您的Mesos任务,目前以下选项可用
* **cpus**:任务要使用的CPU数量。
* **mem**:为任务保留的MB内存。
**磁盘**:用于任务的磁盘量。
**镜像**:Docker镜像名称。如果没有设置,将使用mesos容器化器。
mem和cpus的默认值是在_satyr_中设置的一些较低值,因此建议您在此处覆盖它们。更多选项如约束、其他资源正在开发中。
[](https://gitter.im/lensacom/dask.mesos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[Apache Mesos](http://mesos.apache.org/)后端为[Dask](https://github.com/dask/dask)调度库。
在您的Mesos集群上运行分布式Python Dask工作流。
## 突出功能
- 在Docker容器中分布式运行任务
- 每个任务指定资源需求
- 二进制打包以优化资源利用率
## 安装
**先决条件**: [satyr](https://github.com/lensacom/satyr), [dask](https://github.com/dask/dask.git), [toolz](https://pypi.python.org/pypi/toolz)。所有这些都应该使用以下命令安装
`pip install dask.mesos` 或使用 [lensa/dask.mesos](https://hub.docker.com/r/lensa/dask.mesos/) Docker镜像
配置
- `MESOS_MASTER=zk://127.0.0.1:2181/mesos`
- `ZOOKEEPER_HOST=127.0.0.1:2181`
## 示例
```python
from __future__ import absolute_import, division, print_function
from dask_mesos import mesos, MesosExecutor
@mesos(cpus=0.1, mem=64)
def add(x, y)
"""在Mesos上使用指定的资源运行add"""
return x + y
@mesos(cpus=0.3, mem=128, image='lensa/dask.mesos')
def mul(x, y)
"""在指定的Docker镜像中运行mul"""
return x * y
with MesosExecutor(name='dask') as executor
"""此上下文处理Mesos调度器的生命周期"""
a, b = 23, 89
alot = add(a, b)
gigalot = mul(alot, add(10, 2))
gigalot.compute(get=executor.get) # (a + b) * (10 + 2)
executor.compute([alot, gigalot]) # future列表
```
## 配置dask.mesos任务
您可以在装饰器中配置您的Mesos任务,目前以下选项可用
* **cpus**:任务要使用的CPU数量。
* **mem**:为任务保留的MB内存。
**磁盘**:用于任务的磁盘量。
**镜像**:Docker镜像名称。如果没有设置,将使用mesos容器化器。
mem和cpus的默认值是在_satyr_中设置的一些较低值,因此建议您在此处覆盖它们。更多选项如约束、其他资源正在开发中。
项目详情
关闭
dask.mesos-0.2.2.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 8398a0a85db1ca442c2dc2536da33fbcebd700ef4fa67427e19683f06121dca4 |
|
MD5 | 5e91a6c1dfc2e5b6c18ee9ed9d0d8383 |
|
BLAKE2b-256 | d9ee9b16a06511ebaefa9391d326d601e77dd942328ffa4b7cfbd5d70e5dc14a |