profiles {
    standard {
        process.conda = "${params.condadir}"
    }

    docker {
        docker.enabled = true
        docker.runOptions = '-u \$(id -u):\$(id -g)'
        process.container = "${docker_repo}/tools-${manifest.name}:${container_version}"
    }

    singularity {
        singularity.enabled = true
        singularity.autoMounts = true
        singularity.cacheDir = "${singularity_cache}"
        process.container = "docker://${docker_repo}/tools-${manifest.name}:${container_version}"
    }

    slurm {
        singularity.enabled = true
        singularity.autoMounts = true
        singularity.cacheDir = "${singularity_cache}"
        process {
            container = "docker://${docker_repo}/tools-${manifest.name}:${container_version}"
            executor = 'slurm'
            queue = "${params.queue}"
            scratch = !params.disable_scratch
            time = (params.max_time).m
        }
    }

    awsbatch {
        docker.enabled = true
        docker.runOptions = '-u \$(id -u):\$(id -g)'
        aws {
            region = "${params.aws_region}"
            client {
                uploadStorageClass = "${params.aws_upload_storage_class}"
            }
            batch {
                volumes = "${params.aws_volumes}"
                cliPath = "${params.aws_cli_path}"
                maxParallelTransfers = params.aws_max_parallel_transfers
                delayBetweenAttempts = params.aws_delay_between_attempts
                maxTransferAttempts = params.aws_max_transfer_attempts
            }
        }

        process {
            container = "${docker_repo}/tools-${manifest.name}:${container_version}"
            executor = 'awsbatch'
            queue = "${params.queue}"
        }
    }
}
