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)


Be sure to include an if __name__ == "__main__": block when using dask_cuda.LocalCUDACluster in a standalone Python script. See standalone Python scripts for more details.

dask cuda worker

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("")