Closed raivivek closed 4 years ago
I don't see why that wouldn't work, as long as the bases are public. I think you are likely building with Singularity 2.5.1 - go to your collection settings and try upgrading the builder to a version that supports the library:// uri and rebuild.
For your build strategy, that will be good to save time, of course your base image might not get the same regular updates as if you had built from scratch. For this reason, my preference is to keep most bases as regularly updated images, and ensure regular rebuild, as long as time allows for it.
Hi @vsoch -- You're right that I was using Singularity 2.5.1. Changing to newer version fixed that. However, I am seeing this error in a build log and wondering if you'd know why --
34mINFO: [0m Adding environment to container
[34mINFO: [0m Creating SIF file...
[34mINFO: [0m Build complete: /root/build/container.sif
ERROR Final image does not exist.
The container builds fine.. but something happens at the end. https://singularity-hub.org/containers/12167/log
Take a look at the bottom of the log (sometimes it's piped out of order) it looks like something goes wrong with your conda install:
Removed macs2-2.2.6-py36h516909a_0.tar.bz2
Removed jinja2-2.10.3-py_0.tar.bz2
Removed dnaio-0.4.1-py36h516909a_0.tar.bz2
Removed pyyaml-5.2-py36h7b6447c_0.conda
Removed coloredlogs-10.0-py36_0.conda
Removed matplotlib-3.1.1-py36h5429711_0.conda
Removed coreutils-8.25-1.tar.bz2
Removed sip-4.19.8-py36hf484d3e_0.conda
Removed boost-cpp-1.70.0-ha2d47e9_1.tar.bz2
Removed boost-1.70.0-py36h9de70de_1.tar.bz2
Removed simplejson-3.17.0-py36h7b6447c_0.conda
Removed gstreamer-1.14.0-hb453b48_1.conda
Removed qt-5.9.6-h8703b6f_2.conda
WARNING: /root/.conda/pkgs does not exist
Cache location:
There are no unused packages to remove
Return value of 1.
End Time: Sun Feb 2 22:02:55 UTC 2020.
And the return value is 1, which would mean that the final image won't be found (the message you reported).
I see that message in my local build as well but the final container is still built. Let me dig around a little more and get back to you. Thanks!
For instance, here's the log message when built using sylabs remote builder:
...
Removed lz4-c-1.8.1.2-h14c3975_0.conda
WARNING: /root/.conda/pkgs does not exist
Cache location:
There are no unused packages to remove
INFO: Adding labels
WARNING: Label: Author already exists and force option is false, not overwriting
WARNING: Label: Version already exists and force option is false, not overwriting
INFO: Adding environment to container
INFO: Creating SIF file...
INFO: Build complete: /tmp/image-435924359
WARNING: Skipping container verifying
The only thing that matters is the return code - try to reproduce return value of 1 with the same version of Singularity as the builder. Then if you aren’t able, we need to figure out what permissions you have locally that aren’t available for a remote build on Singularity Hub.
Hi @vsoch -- the same definition file when run with the Singularity version 2.5.x builds successfully. So it looks like some sort of the configuration error with 3.x versions, but I wouldn't bet my life on it. What can I do to help you investigate?
I don't have the bandwidth to debug individual builds, but if you really want to dig in, the secure build code (with limited resources) that is installed and compiled on the builder is here: https://github.com/singularityhub/singularity-python/tree/v3.4.2/singularity/build/scripts. Specifically, you can see how the instance is prepared with singularity-prepare-instance.sh, and then run with singularity-build-latest.sh, which just uses singularity python to run secure-build.sh.
Hi, I'm trying to build a few containers on singularity-hub.org that rely on a base image pulled from sylabs.io registry. Is this currently not possible?
Also, while at it -- do you have any recommendation on what is the best way to publish a few containers. Right now, I build a "base" Singularity container (published on sylabs registry) using Miniconda3 configuration and then make other containers from that (on singularity-hub.org). Is this too complicated/unnecessary? Thanks!