Hi all, I really enjoyed the summit and I am very happy we now have a community forum!
After having seen the wave-cli
demo by @paolo, I have been experimenting a bit with it and, especially, singularity. I am using singularity-ce version 3.9.5.
As from the demo and the docs, I used the --singularity
option freezing the image and specifying a build repo and that worked:
> singularity exec $(wave --conda-package star=2.4.0j --conda-package sambamba=0.7.1 --singularity --freeze --build-repo docker.io/emi80/wave-build --await) STAR --version
INFO: Downloading oras image
INFO: Converting SIF file to temporary sandbox...
STAR_2.4.0j
INFO: Cleaning up image...
Then, I was wondering whether I could directly create a container from the image stored in the wave server (I know that the built images are cleaned up, but I think this could be useful for quick-building images or for on-prem wave servers):
> singularity exec docker://$(wave --conda-package star=2.4.0j --conda-package sambamba=0.7.1 --await) STAR --version
INFO: Using cached SIF image
INFO: Converting SIF file to temporary sandbox...
FATAL: "STAR": executable file not found in $PATH
INFO: Cleaning up image...
It almost worked but it seems like using the exec
singularity command (mimicking Nextflow behavior) the tools are not found in $PATH. Using run
would solve the issue as the micrimamba Docker image as a default SHELL
command that configures the conda environment. Using the full path of the tools would work:
❯ singularity exec docker://$(wave --conda-package star=2.4.0j --conda-package sambamba=0.7.1 --await) /opt/conda/bin/STAR --version
INFO: Using cached SIF image
INFO: Converting SIF file to temporary sandbox...
STAR_2.4.0j
INFO: Cleaning up image...
I was wondering whether this is a bug and, in case, if it could be fixed by:
- prepending the image returned by Wave with
docker://
when a singularity image is requested and thus not requiring a freeze
and either:
- updating the micromamba Docker image to work with
singularity exec
- use
singularity run
in Nextflow (though this could possibly have an unexpected impact on existing pipelines)
P.S. Tried with singularity 4 and the --oci
flag but AFAIU it still needs the docker://
prefix and does not help either:
❯ singularity exec --oci docker://$(wave --conda-package star=2.4.0j --conda-package sambamba=0.7.1 --await) STAR --version
INFO: Using cached OCI-SIF image
2023-10-22T09:04:00.000543593Z: executable file `STAR` not found in $PATH: No such file or directory
Thanks!