Skip to content

Update the singularity command line parameter for apptainer #1572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kinow opened this issue Dec 1, 2021 · 8 comments
Open

Update the singularity command line parameter for apptainer #1572

kinow opened this issue Dec 1, 2021 · 8 comments

Comments

@kinow
Copy link
Member

kinow commented Dec 1, 2021

Placeholder issue for future work after Singularity has moved to under the Linux Foundation as “Apptainer”.

From @mr-c on Element about renaming --singularity to --apptainer in cwltool:

Sure, but we'll likely keep the other name as a fallback.
Or better yet, auto detect which engine is installed. I believe there is an issue for that already

@salexan2001
Copy link
Contributor

Could you please link the issue for the autodetection of the singularity engine? I am having issues with usage of apptainer together with cwltool and I am looking for more information.

@mr-c
Copy link
Member

mr-c commented Apr 13, 2022

#642

@tom-tan
Copy link
Member

tom-tan commented Apr 13, 2022

Related issue:

There were two similar but different implementation of "Singularity". That is:

  • the original version by Lawrence Berkeley National Laboratory (that is now rebranded to Apptainer), and
  • the forked version by Sylabs (the document by Sylabs call it SingularityCE since v3.8).

I know they shared most of the code base but we have to distinguish one to another because they will have different feature set in the future.

I am curious which singularity (or both) is currently supported by cwltool.

@mr-c
Copy link
Member

mr-c commented Apr 13, 2022

@tom-tan In theory, both should work. Currently the name of the command line interface to apptainer/singularity is hardcoded to singularity; that could be made configurable..

@salexan2001
Copy link
Contributor

However, there seems to be an error regarding the "version check", as apptainer and singularity seem to have different versioning conventions. I am currently receiving the following error with apptainer:

ERROR Workflow error, try again with --debug for more information:
Singularity is not available for this tool, try --no-container to disable Singularity, or install a user space Docker replacement like uDocker with --user-space-docker-cmd.: invalid literal for int() with base 10: 'a'

... while it works perfectly with the syslabs-singularity (and also with standard docker in this case).

(I started the job using $ cwltool --singularity 1st-tool.yml echo-job.yml)

So probably either the two command lines (--singularity / --apptainer) need a specific version check or the versioning scheme needs to be auto-detected depending on whether the one or the other singularity distribution is used.

I have attached the (slightly shortened) full output with --debug option:

bug_report_cwltool.txt

@mr-c
Copy link
Member

mr-c commented Apr 19, 2022

Thank you @salexan2001 for trying this out. Would you be able to help us implement auto-detection of docker / podman / singularity / apptainer with correct version parsing?

@salexan2001
Copy link
Contributor

Sure, I will have a look at the contribution guidelines and prepare a pull request. I have no experience with podman so far.

@mr-c
Copy link
Member

mr-c commented Apr 20, 2022

@salexan2001 Thanks! I can help with the podman side. I don't think we track the version there, so for podman we only need to use shutil.which() to detect if it is on the system path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants