A Dask-CUDA cluster can be created using either LocalCUDACluster or dask-cuda-worker from the command line.


To create a Dask-CUDA cluster using all available GPUs and connect a Dask.distributed Client to it:

from dask_cuda import LocalCUDACluster
from dask.distributed import Client

cluster = LocalCUDACluster()
client = Client(cluster)


To create an equivalent cluster from the command line, Dask-CUDA workers must be connected to a scheduler started with dask-scheduler:

$ dask-scheduler
distributed.scheduler - INFO -   Scheduler at:  tcp://

$ dask-cuda-worker

To connect a client to this cluster:

from dask.distributed import Client

client = Client("")