Adds scripts for building singularity images#1
Adds scripts for building singularity images#1Tomaz-Vieira wants to merge 3 commits intoilastik:masterfrom
Conversation
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.
k-dominik
left a comment
There was a problem hiding this comment.
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
| ILASTIK_DOCKER_IMAGE_VERSION=${ILASTIK_DOCKER_IMAGE_VERSION:-1.3.2b3} | ||
| CONTAINER_NAME="ilastik-from-binary_${ILASTIK_DOCKER_IMAGE_VERSION}.sif" | ||
|
|
||
| source scriptVars.sh |
There was a problem hiding this comment.
will this work if you install singularity without using your scripts?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| sed -i "/^.*$BASHRC_SIGNATURE/d" ~/.bashrc | ||
|
|
||
|
|
||
| errcho "Singularity successfully uninstalled" |
There was a problem hiding this comment.
uninstall doesn't seem to uninstall everything it installed... e.g. go is still there
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I guess what I was hinting at is using something like conda to handle that...
|
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? |
|
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 |
|
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. |
|
Ok, then. I'll push a patch for all that today |
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.