构建CentOS Linux中的Python脚本的Singularity镜像。

huangapple go评论91阅读模式
英文:

building singularity image for python script in centOS linux

问题

I am trying to build singularity image in centOS linux. to do so I have make the following Singularity.recipe:

Bootstrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/x86_64/
Include: yum

%post
yum -y install epel-release
yum -y install python34

%file
QC.py /

%runscript
python3 /QC.py

and then I used this command to build the image:

sudo singularity build test.simg Singularity.recipe

but I gave this error:

FATAL: Unable to build from Singularity.recipe: while parsing definition: Singularity.recipe: invalid section(s) specified: file

do you know how to solve the problem?

英文:

I am trying to build singularity image in centOS linux. to do so I have make the following Singularity.recipe:

Bootstrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/x86_64/
Include: yum

%post
     	yum -y install epel-release
        yum -y install python34

%file
     	QC.py /

%runscript
	python3 /QC.py

and then I used this command to build the image:

sudo singularity build test.simg Singularity.recipe

but I gave this error:

FATAL:   Unable to build from Singularity.recipe: while parsing definition: Singularity.recipe: invalid section(s) specified: file

do you know how to solve the problem?

答案1

得分: 1

"%file"不是一个有效的部分名称,正如错误消息所述。正确的部分名称应为"%files"。

英文:

As the error message says, %file is not a valid section name. The correct section name is %files.

huangapple
  • 本文由 发表于 2020年1月3日 21:45:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/59579676.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定