Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 719
user3925736 Avatar asked Mar 15 '26 18:03

user3925736


1 Answers

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

like image 77
tsnowlan Avatar answered Mar 17 '26 12:03

tsnowlan