Docker Nextflow+;奇点:即使文件存在,也没有这样的文件或目录
我正在尝试运行它,它是用Nextflow实现的,并使用Docker容器。不幸的是,我不能使用Docker,因为它与HPC不兼容(没有sudo),所以我使用Singularity而不是Docker。但是,路径似乎没有正确装载,因为我遇到了以下错误:Docker Nextflow+;奇点:即使文件存在,也没有这样的文件或目录,docker,filesystems,singularity-container,nextflow,Docker,Filesystems,Singularity Container,Nextflow,我正在尝试运行它,它是用Nextflow实现的,并使用Docker容器。不幸的是,我不能使用Docker,因为它与HPC不兼容(没有sudo),所以我使用Singularity而不是Docker。但是,路径似乎没有正确装载,因为我遇到了以下错误: Error executing process > 'truncate_input_headers' Caused by: Process `truncate_input_headers` terminated with an error
Error executing process > 'truncate_input_headers'
Caused by:
Process `truncate_input_headers` terminated with an error exit status (1)
Command executed:
truncate_header.lua < phased.1_scaffolds_FINAL.fasta > truncated.fasta
Command exit status:
1
Command output:
(empty)
Command error:
.command.sh: line 2: phased.1_scaffolds_FINAL.fasta: No such file or directory
Work dir:
/work/project/ladsie_002/work/77/1854982bdacdd60fbe447554ab153b
Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`
这是我的配置:
env {
GT_RETAINIDS = "yes"
AUGUSTUS_CONFIG_PATH = "/opt/data/augustus"
FILTER_SHORT_PARTIALS_RULE = "/opt/data/filters/filter_short_partials.lua"
PFAM = "/opt/pfam/Pfam-A.hmm"
PFAM2GO = "/opt/data/pfam2go/pfam2go.txt"
RATT_CONFIG = "/opt/RATT/RATT.config_euk_NoPseudo_SpliceSite"
}
params.GO_OBO = "/opt/go.obo"
params.NCRNA_MODELS = "/opt/data/cm/rnas.cm"
params.CIRCOS_CONFIG_FILE = "/opt/data/circos/circos.debian.conf"
params.CIRCOS_BIN_CONFIG_FILE = "/opt/data/circos/circos.bin.debian.conf"
params.SPECFILE = "/opt/data/speck/output_check.lua"
params.AUGUSTUS_EXTRINSIC_CFG = "/opt/data/augustus/extrinsic.cfg"
process {
container = 'sangerpathogens/companion:latest'
}
singularity {
enabled = true
// autoMounts = true
}
executor {
name = 'local'
queueSize = 2
pollInterval = '3sec'
}
我试图找到解决方案,唯一能找到的是autoMounts=true
选项(上面已注释掉),这会导致管道在启用时甚至找不到自己的lua脚本:
Error executing process > 'truncate_input_headers'
Caused by:
Process `truncate_input_headers` terminated with an error exit status (127)
Command executed:
truncate_header.lua < phased.1_scaffolds_FINAL.fasta > truncated.fasta
Command exit status:
127
Command output:
(empty)
Command error:
.command.sh: line 2: truncate_header.lua: command not found
Work dir:
/work/project/ladsie_002/work/95/f03b31ed18a84f331b83cad0232bd5
Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
编辑2:
我修复了导致另一个错误的错误安装点:
gt: error: could not execute script ...rk/project/ladsie_002/companion/bin/gff3_to_embl.lua:74: bad argument #1 to 'lines' (/opt/go.obo: Permission denied)
我猜容器内的权限设置不正确。Singulary可能无法正确转换用户环境定义的Docker容器。确保奇点图像定义路径和项目Dockerfile中定义的其他变量。如上所述,您需要确保奇点图像内的环境设置正确。您可以通过奇点定义文件中的
%环境
块或在主机环境中导出奇点。e、 例如,SINGULARITY_PERL5LIB=/opt/ORTHOMCLV1.4/:/opt/RATT/:/opt/ABACAS2/:$PERL5LIB
位于下一个流配置的env
块中,用于设置容器内的PERL5LIB
变量
您还可能需要在singularity.runOptions
中指定要装入容器的数据的位置。其中的细节取决于您使用的是哪个版本的Singularity,以及主机操作系统是否在其内核中启用了OverlayFS
编辑1:绑定/安装
基本形式是-B/host/path:/image/path
。如果奇点映像中不存在/image/path
,并且操作系统内核中未启用OverlayFS,则会收到错误消息:警告:跳过用户绑定,容器中不存在绑定点(目录/文件):“/image/path”
。其中,目录/文件
是正在装载的内容
您可以在版本3+中使用--debug
标志或在版本2中使用-vv
来查看正在装入的内容。在nextflow中,这将添加到singularity.engineOptions
请注意,如果挂载目录中的任何符号链接引用的路径在singularity映像中不可用,则它们将断开
如果装载的数据包含符号链接,则它们通常引用未装载到容器中的文件,并且在运行singularity映像时看起来是断开的链接
编辑2:文件权限
构建奇点图像的最简单方法是sudo singularity build companion.sifdocker://sangerpathogens/companion:latest
。如果需要修改任何内容,如/opt/go.obo
文件,则需要创建一个定义文件
Bootstrap: docker
From: sangerpathogens/companion:latest
# note: for reproducibility, it is best to use a tag whose target won't change over time
%post
chmod 644 /opt/go.obo
如果需要任何其他更改,它们将进入%post
块。与Docker不同,singularity不使用每个命令的层来创建图像,因此您不必担心链接some_command&&some_other_command&&so_on&&etc
此修复程序将有助于不存在truncate_headers.lua脚本
您使用哪个版本的singularity构建图像,运行哪个版本的图像?您是直接在VM上运行nextflow还是使用slurm/PBS提交到集群?singularity版本3.2.1-1.1.el7。现在,我正在测试直接在集群的head/master节点上运行nextflow。解决此问题后,我将修改配置以使用SLURM提交作业。路径设置正确(至少在第一种情况下),因为它在Docker容器中找到了工具和脚本。找不到的是文件系统中容器外的文件。我正在运行singularity版本3.2.1-1.1.el7。如何确定主机操作系统是否启用了OverlayFS,以及如何正确装载数据?路径似乎设置得很好,是由nextflow链接的数据,无法看到。将--debug
添加到singularity。runOptions
。在nextflow日志中,grep用于Mounting/
。这将显示容器内安装的所有主机位置。如果未启用OverlayFS,并且您尝试将数据装载到的目录不存在,您将在过程日志中看到警告“跳过使用绑定,不存在绑定点…”。更新了答案,并提供了其他绑定/装载说明。覆盖层可能没问题。如果您的集群运行的是较旧的操作系统(cento/rhel 6、Ubuntu14.04等),这通常是一个问题。谢谢您的帮助。实际上,必须将--debug
添加到singularity.engineOptions
。然而,这条路似乎已经走上。我更新了问题。我想我一开始就错过了这个。工作
目录中的文件是否是指向其他文件的符号链接?如果是这样,很有可能链接到的文件不在图像中,而程序只是看到一个断开的链接。尝试直接在链接文件上运行,或将-B/work
添加到singularity.runOptions
。
gt: error: could not execute script ...rk/project/ladsie_002/companion/bin/gff3_to_embl.lua:74: bad argument #1 to 'lines' (/opt/go.obo: Permission denied)
Bootstrap: docker
From: sangerpathogens/companion:latest
# note: for reproducibility, it is best to use a tag whose target won't change over time
%post
chmod 644 /opt/go.obo