Skip to content
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

Add error message that Singularity needs PIP #899

Merged
merged 3 commits into from
Jul 30, 2020
Merged

Add error message that Singularity needs PIP #899

merged 3 commits into from
Jul 30, 2020

Conversation

wtraylor
Copy link
Contributor

It says it in the README.md that Singularity is not supported by
Popper installed through install.sh, but not every user has read it.

This fixes part of #898.

It says it in the `README.md` that Singularity is not supported by
Popper installed through `install.sh`, but not every user has read it.
@ivotron
Copy link
Collaborator

ivotron commented Jul 29, 2020

thanks @wtraylor, that's a great catch! One thing we can do, in order to make this more generic, is to identify this within popper itself. We can check whether we're running inside docker when --engine=singularity is given (as shown here https://stackoverflow.com/a/20012536), for example as part of the constructor of the Singularity runner. what do you think?

Having the error message about singularity being run within docker in
the Python code makes it more generic.

Looking at /proc/1/cgroup to check for docker environment is recommended
here: https://stackoverflow.com/a/20012536
@wtraylor
Copy link
Contributor Author

That’s a good idea to move the message to SingularityRunner.
I implemented it in a new commit.

I tested it like this:

docker run -it --rm -v $PWD:$PWD -w $PWD --network host --entrypoint sh python:3.7.7-alpine3.12
# Within the container:
apk add --no-cache git
apk pip install --no-cache-dir popper/src
cd /tmp
popper scaffold
popper run -e singularity -f wf.yml
# Error message comes here as expected.
popper run -f wf.yml
# No error message.

@ivotron
Copy link
Collaborator

ivotron commented Jul 30, 2020

thanks a lot @wtraylor ! This is awesome. And thanks a lot for taking the time to test it on your end!

@ivotron ivotron merged commit 906bc30 into getpopper:master Jul 30, 2020
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

Successfully merging this pull request may close these issues.

2 participants