Flux调度器的snakemake执行器插件
项目描述
Snakemake Executor Flux
这是一个外部snakemake插件的示例实现。由于我们已经有了一个Flux的(并且它可以在容器中运行),所以这个示例是针对Flux的。您可以将此存储库作为设计自己的执行器的基础,以与snakemake一起使用!
用法
教程
对于这个教程,您需要安装Docker安装程序。
Flux-framework 是一个灵活的资源调度器,可以在高性能计算系统和云(例如,Kubernetes)上运行。由于它更现代(例如,有官方Python API),我们将其定义为云资源。对于这个示例,我们将向您展示如何设置一个“单个节点”本地Flux容器,使用此处的插件与snakemake交互。您可以使用Dockerfile来提供一个包含Flux和snakemake的容器。请注意,我们是从源代码安装的,并将绑定到 /home/fluxuser/snakemake
,目的是能够进行开发(如果需要的话)。
首先,构建容器
$ docker build -f example/Dockerfile -t flux-snake .
我们将在 /home/fluxuser/plugin
中添加插件,安装它,并以 fluxuser 的身份 shell 进去,以最佳方式与 flux 交互。在容器构建完成后,shell 进去
$ docker run -it flux-snake bash
并启动一个 flux 实例
$ flux start --test-size=4
进入示例目录(其中包含 Snakefile),然后运行 snakemake,针对您的执行器插件。
$ cd ./example
# This says "use the custom executor module named snakemake_executor_plugin_flux"
$ snakemake --jobs 1 --executor flux
Building DAG of jobs...
Using shell: /bin/bash
Job stats:
job count min threads max threads
------------------------ ------- ------------- -------------
all 1 1 1
multilingual_hello_world 2 1 1
total 3 1 1
Select jobs to execute...
[Fri Jun 16 19:24:22 2023]
rule multilingual_hello_world:
output: hola/world.txt
jobid: 2
reason: Missing output files: hola/world.txt
wildcards: greeting=hola
resources: tmpdir=/tmp
Job 2 has been submitted with flux jobid ƒcjn4t3R (log: .snakemake/flux_logs/multilingual_hello_world/greeting_hola.log).
[Fri Jun 16 19:24:32 2023]
Finished job 2.
1 of 3 steps (33%) done
Select jobs to execute...
[Fri Jun 16 19:24:32 2023]
rule multilingual_hello_world:
output: hello/world.txt
jobid: 1
reason: Missing output files: hello/world.txt
wildcards: greeting=hello
resources: tmpdir=/tmp
Job 1 has been submitted with flux jobid ƒhAPLa79 (log: .snakemake/flux_logs/multilingual_hello_world/greeting_hello.log).
[Fri Jun 16 19:24:42 2023]
Finished job 1.
2 of 3 steps (67%) done
Select jobs to execute...
[Fri Jun 16 19:24:42 2023]
localrule all:
input: hello/world.txt, hola/world.txt
jobid: 0
reason: Input files updated by another job: hello/world.txt, hola/world.txt
resources: tmpdir=/tmp
[Fri Jun 16 19:24:42 2023]
Finished job 0.
3 of 3 steps (100%) done
Complete log: .snakemake/log/2023-06-16T192422.186675.snakemake.log
就这样!继续阅读以了解更多关于插件设计的信息,以及您如何也可以设计自己的执行器插件用于使用或开发(不需要添加到上游 snakemake)。
开发者
进行相同的运行,但绑定本地插件目录
docker run -it -v $PWD/:/home/fluxuser/plugin flux-snake bash
创建和搭建此插件的说明在这里。通过snakemake-executor-plugin-interface提供编写插件示例的说明。
项目详情
关闭
snakemake_executor_plugin_flux-0.1.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 26655bd1cf5d7db5dfcfdfbd006c1db35968c0ad1772e0b010e64e6f71b00163 |
|
MD5 | 6816fc6856a99fc0b8baacc076e6ee50 |
|
BLAKE2b-256 | 00d61112d713606d6e3772468a691307574354907c64bc6df76cb92aafb36268 |
关闭
snakemake_executor_plugin_flux-0.1.1-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5a287a02c84f9e0e91734f49a193769edc9a675f80d88ba374dfda6b72d651ad |
|
MD5 | 60e23682517c6ed8c6eceea72af07fe4 |
|
BLAKE2b-256 | c0f44e2f7c197a74fcc2b458b47aaaccdddc2ac56efba6fdb0ba9826fe7f3cf7 |