diff --git a/Singularity/Hands-on.md b/Singularity/Hands-on.md index c9939a0ccf68bf614d87b215e587d83094c13fd8..10f55908d517159d9ccd7e59312a81cce8d396df 100644 --- a/Singularity/Hands-on.md +++ b/Singularity/Hands-on.md @@ -121,6 +121,7 @@ $ singularity build --remote simple.sif simple.def * [ ] In **%files** section copy file we created outside of the container to the inside of it * [ ] Add **%environment** section and set some varables * [ ] Update the package lists and install **fortune** applications in **%post** section +* [ ] Add **/usr/games** to **PATH** so we can access **fortune** directly * [ ] Make **/srv** writable for all users * [ ] Write **%runscript** that use previously installed application (use full paths) * [ ] Make **%test** script and ensure that applications are installed correctly @@ -197,6 +198,22 @@ Template: singularity run myimage.sif | singularity run --app <appname> myimage.sif ``` +## Running an Instance + +* [ ] Run your image as an instance +* [ ] List running instances +* [ ] Shell into instance +* [ ] Try stdin and stdout to the instance +* [ ] Stop all instances + +``` +singularity instance start myimage.sif <instance name> +singularity instance list +singularity instance shell instance://<instance name> +singularity run instance://<instance name> | singularity run --app <app name> instance://<instance name> +singularity instance stop --all +``` + ## Signing and Verifying Containers Singularity 3.0 introduces the abilities to create and manage PGP keys and use them to sign and verify containers. This provides a trusted method for Singularity users to share containers. It ensures a bit-for-bit reproduction of the original container as the author intended it.