> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Scale distributed workloads

Use Domino to create on-demand Spark, Dask, Ray, or MPI compute clusters to speed up computationally-intensive jobs. Execute your jobs in any cloud or on-prem cluster to preserve data locality and optimize spend.

This article contains an overview and examples for compute clusters in Domino. Learn how to do the following:

* Enable clusters in your Domino deployment.

* Use Domino to orchestrate distributed and parallel training workloads.

## Enable and configure cluster deployments

Before you use on-demand clusters, enable them in your workspace and create a base cluster image:

* [Configure Spark clusters](/cloud/platform-capabilities/features/compute-clusters-hpc/spark/on-demand-spark/configure-prerequisites) for your Domino deployment.

* [Configure Ray clusters](/cloud/platform-capabilities/features/compute-clusters-hpc/ray/configure-prerequisites) for your Domino deployment.

* [Configure Dask clusters](/cloud/platform-capabilities/features/compute-clusters-hpc/dask/configure-prerequisites) for your Domino deployment.

* [Configure MPI clusters](/cloud/platform-capabilities/features/compute-clusters-hpc/mpi/configure-mpi-prerequisites) on your Domino deployment.

## Distributed and parallel training

Generally, there are two ways you can use compute clusters to train models in Domino:

* As the compute environment for interactive workspace such as Jupyter Notebooks (or any other IDE) running on top of the cluster.

* As a job-based compute cluster that executes a training script or job you define.

Typically, interactive workspaces are used to explore datasets and training approaches. In contrast, use the job-based method after you’ve developed a training approach and want to repeat it.

Select the cluster type to learn more. For more information on choosing a cluster type, see our blog post [Spark, Dask, and Ray: Choosing the right framework](https://www.dominodatalab.com/blog/spark-dask-ray-choosing-the-right-framework).

<Tabs>
  <Tab title="Spark">
    [Spark](https://spark.apache.org/) provides a simple way to parallelize compute-heavy workloads such as distributed training. Spark benefits iterative training algorithms or multi-threaded tasks over large data sets.

    Domino supports fully containerized executions of Spark workloads on the Domino Kubernetes cluster. You can interact with Spark through Domino in the following ways:

    * Use Spark in an [interactive workspace](/cloud/platform-capabilities/features/compute-clusters-hpc/spark/on-demand-spark/work-with-your-cluster).
    * Use Spark in [batch mode through a Domino job](/cloud/platform-capabilities/features/compute-clusters-hpc/spark/on-demand-spark/work-with-your-cluster).
    * Directly with [spark-submit](https://spark.apache.org/docs/latest/submitting-applications.html).

    When you start a workspace or a job that uses an on-demand cluster, Domino orchestrates a cluster in standalone mode. The master and workers are newly deployed containers, and the driver is your Domino workspace or job.

    See the [Spark quickstart project](https://github.com/dominodatalab/spark-quickstart-winequality) to walk through environment setup, project creation, and model training.

    Domino also provides access to GPU-accelerated backend compute for the Spark workers. Combined with the [RAPIDS Accelerator for Spark](https://rapids.ai/), you can enable GPU-accelerated processing on the Spark worker nodes. For more information, see the [Webinar for GPU-accelerated Spark and RAPIDS](https://github.com/dominodatalab/webinar-gpu-accelerated-spark-and-rapids).
  </Tab>

  <Tab title="Ray">
    [Ray](https://www.ray.io/) is an extensive distributed computing library of tools that reduces training time for parallel and distributed applications. You can interact with Ray through a Domino in the following ways:

    * In an [interactive workspace](/cloud/platform-capabilities/features/compute-clusters-hpc/ray/work-with-your-cluster).
    * In [batch mode through a Domino job](/cloud/platform-capabilities/features/compute-clusters-hpc/ray/work-with-your-cluster).

    Ray provides:

    * Simple primitives for building and running distributed applications.
    * Tools that allow users to parallelize single machine code with little to zero code changes.
    * Applications, libraries, and tools for deep learning.

    See the [Ray quickstart project](https://github.com/dominodatalab/domino-quickstart-ray) to walk through environment setup and multiple types of training algorithms.
  </Tab>

  <Tab title="Dask">
    [Dask](https://www.dask.org/) provides a drop-in replacement to train parallelizable scikit-learn models at scale. You can run Dask in single-node and distributed modes to enable parallelization and distribution. You can interact with Dask through a Domino in the following ways:

    * Use Dask in an [interactive workspace](/cloud/platform-capabilities/features/compute-clusters-hpc/dask/work-with-your-cluster).
    * Use Dask in [batch mode through a Domino job](/cloud/platform-capabilities/features/compute-clusters-hpc/dask/work-with-your-cluster).

    See the [Dask quickstart project](https://github.com/dominodatalab/domino-quickstart-dask) to walk through environment setup and multiple types of training algorithms.

    See the [Dask reference project](https://github.com/dominodatalab/reference-project-dask) for an example of using Dask in Domino to train a model. This project covers environment setup, data pipelines, and model training. Focus on [`dask_ml.ipynb`](https://github.com/dominodatalab/reference-project-dask/blob/main/dask_ml.ipynb).
  </Tab>

  <Tab title="MPI">
    [MPI](https://www.mpi-forum.org/) provides a communication protocol for distributed parallel computing. Open MPI is ideal for distributed multi-GPU and multi-CPU training for Tensorflow, PyTorch, Keras, or MXNet models. MPI clusters have lower overhead than other distributed computing systems and are highly customizable.

    You can interact with Dask through a Domino in the following ways:

    * Use MPI in an [interactive workspace](/cloud/platform-capabilities/features/compute-clusters-hpc/mpi/work-with-your-cluster#_create_an_mpi_cluster_with_workspaces).
    * Use MPI in [batch mode through a Domino job](/cloud/platform-capabilities/features/compute-clusters-hpc/mpi/work-with-your-cluster#_create_an_mpi_cluster_with_jobs).
  </Tab>
</Tabs>

## Next steps

Now that you know the concepts behind using Spark, Dask, and Ray to configure clusters for jobs, see how to [Tune Models with Ray Tune](/cloud/platform-capabilities/features/development/ray-tune).
