singularityhub / singularityhub.github.io

Container tools for scientific computing! Docs at https://singularityhub.github.io/singularityhub-docs
https://singularityhub.github.io
68 stars 9 forks source link

error during build phase on singularity-hub not in local #186

Closed bneron closed 3 years ago

bneron commented 5 years ago

Link to Container Collection Log, Build, or Collection (in that order)

https://singularity-hub.org/containers/10747/log https://singularity-hub.org/collections/135

Behavior when Building Locally

The container build normally

...
removing conda-4.3.30-py35hf9359ed_0
removing curl-7.61.0-h93b3f91_2
svn cache (/usr/local/anaconda/conda-bld/svn_cache)
Size:                                           0 B

git cache (/usr/local/anaconda/conda-bld/git_cache)
Size:                                           0 B

hg cache (/usr/local/anaconda/conda-bld/hg_cache)
Size:                                           0 B

source cache (/usr/local/anaconda/conda-bld/src_cache)
Size:                                           0 B

Total:                                          0 B
Removing /usr/local/anaconda/conda-bld/svn_cache
Removing /usr/local/anaconda/conda-bld/git_cache
Removing /usr/local/anaconda/conda-bld/hg_cache
Removing /usr/local/anaconda/conda-bld/src_cache
INFO:    Adding labels
INFO:    Adding environment to container
INFO:    Adding runscript
INFO:    Creating SIF file...
INFO:    Build complete: bioconvert
$
$ls -lh bioconvert 
-rwxr-xr-x 1 bneron bneron 846M Aug 28 15:33 bioconvert

see build_log.tx attached to have the complete local build log build_log.txt

singularity version 3.3.0-1

Error on Singularity Hub

INFO:  Adding labels
INFO:  Adding environment to container
INFO:  Adding runscript
INFO:  Creating SIF file...
INFO:  Build complete: /root/build/container.sif
ERROR Final image does not exist.

but after this output we have trace thath should happen during the %post step

git cache (/usr/local/anaconda/conda-bld/git_cache)
Size: 0 B

svn cache (/usr/local/anaconda/conda-bld/svn_cache)
Size: 0 B

hg cache (/usr/local/anaconda/conda-bld/hg_cache)
Size: 0 B

Total: 0 B
Removing /usr/local/anaconda/conda-bld/src_cache
Removing /usr/local/anaconda/conda-bld/git_cache
Removing /usr/local/anaconda/conda-bld/svn_cache
Removing /usr/local/anaconda/conda-bld/hg_cache

What do you think is going on?

It's like singularity try to build image whereas the post phase is not finish

vsoch commented 5 years ago

It’s likely it ran out of disk space or memory, can you give me estimates times and sizes? Also remember it’s a small instance - the build probably takes longer in shub.

bneron commented 5 years ago

below the output of /usr/bin/time --verbose sudo singularity build bioconvert Singularity

 Command being timed: "sudo singularity build bioconvert Singularity"
        User time (seconds): 910.82
        System time (seconds): 70.77
        Percent of CPU this job got: 149%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 10:57.38
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 2248952
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 15933704
        Voluntary context switches: 341316
        Involuntary context switches: 161448
        Swaps: 0
        File system inputs: 408
        File system outputs: 14056608
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

the size of the final image is 846M

vsoch commented 5 years ago

I don't know @bneron , if the image doesn't build, it typically means what I stated above, or that something that the build needs isn't available in secure build. The only other thing that would be an issue is if you cleared out /tmp, which I don't see you doing. It's very likely that the instance is just small, and it ran out of memory for the actual generation of the container, and the exit code was 1. You could try a different builder, or do toy tests with the current builder and see if something smaller / shorter works okay.