Select 个节点以使用 Kubernetes 执行 Nextflow 工作流

Select nodes to execute Nextflow workflow with Kubernete

我可以访问一个有很多节点的集群。我正在使用以下命令运行设置我的 Nextflow 工作流程:

./nextflow kuberun user/repo -c nextflow.config -profile kubernetes -v my_pvc:/mounted_path -with-report _report.html -with-trace _trace

我想 运行 我的 nextflow 工作流程在一组特定的节点上。我已经标记了我感兴趣的节点:

kubectl label nodes node1 disktype=my_experiment
kubectl label nodes node2 disktype=my_experiment
kubectl label nodes node3 disktype=my_experiment

我无法从 Nextflow 和 Kubernete 文档中了解如何安排我的工作流程,并将流程拆分到我感兴趣的节点之间。

我只了解如何使用 kubernete:https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

但不知道如何执行 nextflow kuberun 命令。

非常感谢任何帮助,谢谢!

使用一个或多个 process selectors and the pod directive 到 select 使用 pod 标签的节点。例如,可以将以下内容添加到您的 'kubernetes' 个人资料中:

process {

    withName: my_process {
        pod {
            nodeSelector = 'disktype=my_experiment'
         }
     }
    ...
}