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

Trying to debug a build #233

Closed
baxpr opened this issue Apr 4, 2021 · 6 comments
Closed

Trying to debug a build #233

baxpr opened this issue Apr 4, 2021 · 6 comments

Comments

@baxpr
Copy link

baxpr commented Apr 4, 2021

Links

Version of Singularity

Tried with two builders: 2.5-100 and 3.2.1-100

Behavior when Building Locally

Builds fine locally with singularity 2.6.1 in an ubuntu 18.04 docker container

Error on Singularity Hub

The matlab binary https://github.com/baxpr/gf-fmri/blob/master/matlab/bin/spm12 doesn't run correctly during the build. In the recipe:

  /opt/gf-fmri/matlab/bin/run_spm12.sh /usr/local/MATLAB/MATLAB_Runtime/v97 function exit

And the error:

/opt/gf-fmri/matlab/bin/spm12: 1: version: not found
/opt/gf-fmri/matlab/bin/spm12: 2: oid: not found
/opt/gf-fmri/matlab/bin/spm12: 3: size: not found

What do you think is going on?

No clue. These error messages are obviously specific to the particular binary so I don't suppose they're much help. But are there some settings that could be different between the shub builders and my local environment? I turned the shub extra debug info on but didn't get any extra info that looked related.

@baxpr
Copy link
Author

baxpr commented Apr 4, 2021

...one thing I do know is that running this binary uncompresses about 220 MB of files into a new folder. That is why it needs to be run in the first place - to generate these files in the container initially, because they can't be generated at runtime because the container is read-only.

@baxpr
Copy link
Author

baxpr commented Apr 4, 2021

One more thing, here is a very similar situation where the build worked fine with ~800 MB of files unpacked:
https://github.com/baxpr/cersuit
https://singularity-hub.org/collections/4797

@vsoch
Copy link
Member

vsoch commented Apr 4, 2021

@baxpr thank you for the detailed links! I haven't used spm in maybe 10 years so I'm feeling out of my base here - it does seem like there is some issue with the binary. Is the run_spm12.sh script made an executable, is it using the right interpreter, and then is spm12 what you think it is (e.g., it's not a dump from GitHub LFS saying "Sorry over quota!" or something like that. I would do some sanity checks - so remove piping to dev null where spm or matlab are concerned, and then when you download a text file or similar, cat the content (and for any downloads maybe check the digest) to be sure you are dealing with what you think you are.

@yarikoptic have you used SPM or Matlab more recently so you might know some ideas?

@baxpr
Copy link
Author

baxpr commented Apr 4, 2021

Oh for heaven's sake. That's exactly what it is. I had marked the spm12 binary for LFS along with the actual large file spm12.ctf, but failed to download it so the container must be getting the github pointer instead of the file. Let me fix that and see if the problem doesn't go away.

@vsoch
Copy link
Member

vsoch commented Apr 4, 2021

Fingers crossed! 🤞

@baxpr
Copy link
Author

baxpr commented Apr 4, 2021

Yep, that was it. Thanks very much for the extra eyes!

@baxpr baxpr closed this as completed Apr 4, 2021
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

2 participants