Skip to content

Adds scripts for building singularity images#1

Open
Tomaz-Vieira wants to merge 3 commits intoilastik:masterfrom
Tomaz-Vieira:singularity
Open

Adds scripts for building singularity images#1
Tomaz-Vieira wants to merge 3 commits intoilastik:masterfrom
Tomaz-Vieira:singularity

Conversation

@Tomaz-Vieira
Copy link
Copy Markdown

The compute infrastructure and CINECA uses singularity containers. This
commit adds some scripts to create a singularity container (.sif) from
our docker from-binary container. Also included are some scripts to
help with installing and uninstalling singularity, as well as for running
the container itself.

The compute infrastructure and CINECA uses singularity containers. This
commit adds some scripts to create a singularity container (.sif) from
our docker from-binary container. Also included are some scripts to
help with installing and uninstalling singularity, as well as for running
the container itself.
Copy link
Copy Markdown
Contributor

@k-dominik k-dominik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey this is very cool.

I tried it out using your scripts and all and it worked 👍

just some minor comments.

  • for the install/uninstall scripts: IMO it would be better to move them into a subdirectory, to make it clearer that these don't have anything to do with the singularity container itself

Todos:

  • since we use conda almost everywhere: check whether the conda singularity installation does the job for us, also keep in mind their timeline to build 3.0: conda-forge/singularity-feedstock#11

Comment thread singularity/runIlastikInSingularity.sh Outdated
ILASTIK_DOCKER_IMAGE_VERSION=${ILASTIK_DOCKER_IMAGE_VERSION:-1.3.2b3}
CONTAINER_NAME="ilastik-from-binary_${ILASTIK_DOCKER_IMAGE_VERSION}.sif"

source scriptVars.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this work if you install singularity without using your scripts?

Copy link
Copy Markdown
Author

@Tomaz-Vieira Tomaz-Vieira Oct 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm it needs an executable go somewhere in the path... I'm not sure if the Conda version exposes that as well... I'll check it out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's because they still have singularity < 3 on conda-forge. Apparently singularity was rewritten in go for 3.0. I don't know which version of singularity we can expect, with the stuff, we're limited to the latest one.

Comment thread singularity/scriptVars.sh Outdated
sed -i "/^.*$BASHRC_SIGNATURE/d" ~/.bashrc


errcho "Singularity successfully uninstalled"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uninstall doesn't seem to uninstall everything it installed... e.g. go is still there

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, go is still there, but the user could have installed it for his own reasons. Same goes for dep. If an avid go user used these escripts and, upon uninstallation, we just nuked both his go and dep installation, he might be mad ^^

The only correct way to handle this would be to uninstall both go and dep only if they were not installed before and if nothing else depended on those packages, but determining that seemed like too much work for this sort of scripts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess what I was hinting at is using something like conda to handle that...

@k-dominik
Copy link
Copy Markdown
Contributor

Hey @Tomaz-Vieira , could you please at least add instructions on how to do it without your scripts to the readme, for the case that people do not need to install singularity and have environment variables set up properly?

@Tomaz-Vieira
Copy link
Copy Markdown
Author

I sure can. But on the other hand, it might turn out that this PR should just be abandoned in favor of the conda solution

@k-dominik
Copy link
Copy Markdown
Contributor

We can add the conda stuff at some later point if we think it is necessary. I think your scripts are great to get started quickly. But I guess the main use of the container will be for people who already use singularity anyhw.

@Tomaz-Vieira
Copy link
Copy Markdown
Author

Ok, then. I'll push a patch for all that today

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