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

# Execution Profiles

Latch supports Nextflow [execution profiles](https://www.nextflow.io/docs/latest/config.html#config-profiles)
which allows users to group related configuration parameters. Users can specify
which configuration profile to use when running their pipeline statically
at registration time or dynamically when launching their workflow in the Latch UI.

## Configuring profiles at workflow registration

To specify an execution profile to use when running the workflow on Latch, pass the
`--nf-execution-profile` flag to the `latch register` command.

For example, to specify the `docker` profile:

```bash theme={null}
latch register . --nf-script main.nf --nf-execution-profile docker
```

The execution profile specified will be hidden from the user on the frontend,
and cannot be changed without re-registering the workflow.

## Configuring profiles at workflow execution

To enable users to dynamically select an execution profile when launching a workflow,
use the `execution_profiles` parameter in the `NextflowMetadata` object as follows:

```python theme={null}
from latch.types.metadata import (
    NextflowMetadata,
    LatchAuthor,
    NextflowRuntimeResources
)
from latch.types.directory import LatchDir

from .parameters import generated_parameters

NextflowMetadata(
    display_name='Workflow Name',
    author=LatchAuthor(
        name="Your Name",
    ),
    parameters=generated_parameters,
    execution_profiles=["docker", "test"], # ADDED
    log_dir=LatchDir("latch:///your_log_dir"),
)
```

This will generate the following dropdown in the Latch UI, enabling users to select
a subset of the execution profiles provided when launching the workflow:

<img src="https://mintcdn.com/latchbio/uN1BKX4g3v1ZQv8l/images/workflows/nextflow/execution-profile-dropdown.png?fit=max&auto=format&n=uN1BKX4g3v1ZQv8l&q=85&s=1355607bfa2180164d87e325121d8ece" alt="Execution Profile Dropdown" width="2283" height="1712" data-path="images/workflows/nextflow/execution-profile-dropdown.png" />
