Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Krause
tardis-doc
Commits
700fe08e
Commit
700fe08e
authored
Apr 23, 2018
by
Hansen
Browse files
software: singularity added example workflow for building a container.
parent
b8718567
Changes
1
Hide whitespace changes
Inline
Side-by-side
software/singularity.rst
View file @
700fe08e
...
...
@@ -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
-------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment