Commit 700fe08e authored by Hansen's avatar Hansen
Browse files

software: singularity added example workflow for building a container.

parent b8718567
......@@ -466,6 +466,46 @@ Only changes made in mounted files and folders
will persist. (see `Container Architecture <arch_>`_)
Example Building Workflow: Building a custom R container
--------------------------------------------------------
1. Build a sandbox from Singularity Hub Container.
.. code-block:: shell
singularity build -s r-sandbox shub://MPIB/singularity-r:3.4.4
2. Work on changes. Test Functionality
.. code-block:: shell
sudo singularity shell -w r-sandbox
# Install R package.
R -e 'install.packages("ggplot2", repos="http://cran.uni-muenster.de")'
# Do something in R to see if it works as expected.
3. Documenting changes in recipe file.
.. code-block:: shell
Bootstrap: shub
From: MPIB/singularity-r:3.4.4
%post
R -e 'install.packages("ggplot2", repos="http://cran.uni-muenster.de")'
# Saved into file called Singularity.3.4.4.ggplot2
4. Repeat 2 and 3 till satisfied with the environment.
5. Build Container or commit it to GitHub to let Singularity Hub build it.
.. code-block:: shell
sudo singularity build R-3-ggplot2 Singularity.3.4.4.ggplot2
# Oder
git add Singularity.3.4.4.ggplot2
git commit -m "Added recipe to create r 3.4.4 with ggplot2 installed"
git push
Singularity Documentation
-------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment