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

Image build failing. #1

Open
andzajan opened this issue Aug 6, 2021 · 4 comments
Open

Image build failing. #1

andzajan opened this issue Aug 6, 2021 · 4 comments

Comments

@andzajan
Copy link

andzajan commented Aug 6, 2021

Hi, I was getting error "source" not found while trying to build an image using Singularity 3.8.1.

Problem was solved by changing line 14 (https://github.com/hyoo/alphafold_singularity/blob/main/alphafold.def#L14) to:

. /opt/miniconda3/etc/profile.d/conda.sh

@hyoo
Copy link
Owner

hyoo commented Aug 6, 2021

This is related to the shell. Are you using bash?
https://askubuntu.com/questions/25488/what-is-the-difference-between-source-and

@andzajan
Copy link
Author

andzajan commented Aug 6, 2021

Yes, building from Ubuntu 20.04 and I guess that builder is executing "source" on the host OS, so I don't know why during my build it's not using bash. I am not very experienced with Singularity.

@aeszter
Copy link

aeszter commented Dec 10, 2021

I've encountered the same error when building on openSUSE, where /bin/sh is symlinked to bash. So maybe source was called inside the container after all?

@fredricj
Copy link

fredricj commented Mar 2, 2023

The default shell in singularity is /bin/sh, i.e. bash in posix mode. Changing %post to %post -c /bin/bash switches to using bash instead which would fix this error and also prevent other errors with non-posix syntax in other shell scripts used by conda

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