Skip to content

Commit 2ac8fe4

Browse files
Docs/feedback marco august 2021 (#437)
* minor edits to intro, install, user-guide(except for cmds) * minor edits to user-guide (cmds section), devel-guide, use-cases
1 parent ae85377 commit 2ac8fe4

File tree

5 files changed

+54
-44
lines changed

5 files changed

+54
-44
lines changed

docs/getting_started/developer-guide.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ And then you would install the module file and container as follows:
4848
4949
$ shpc install python:3.9.2
5050
51-
But since latest is already 3.9.2, you could leave out the tag.
51+
But since latest is already 3.9.2, you could leave out the tag:
5252

5353
.. code-block:: console
5454
55-
$ shpc install python/3.9.2
55+
$ shpc install python
5656
5757
58-
And the module folder shown previously would be generated. Currently, we assume
59-
that any new install will re-pull the container (and remove a previous one).
60-
We will eventually update this to only re-generate if the hash is different.
58+
The module folder will be generated, with the structure discussed in the USer Guide.
59+
Currently, any new install will re-pull the container only if the hash is different, and only re-create the module otherwise.
6160

6261
Contributing Registry Recipes
6362
-----------------------------
@@ -276,6 +275,12 @@ Fields include:
276275
* - description
277276
- Additional information for the registry entry
278277
- false
278+
* - env
279+
- A list of environment variables to be defined in the container (key value pairs, e.g. var: value)
280+
- false
281+
* - features
282+
- Optional key, value paired set of features to enable for the container. Currently allowed keys: *gpu*. Allowed values: *true*, *false* (default)
283+
- false
279284

280285
Other supported (but not yet developed) fields could include different unique
281286
resource identifiers to pull/obtain other kinds of containers. For this

docs/getting_started/installation.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ can write to your install location. Installing locally ensures that you
4848
can easily store your module files along with the install (the default until you
4949
change it). Installation of singularity-hpc adds an executable, `shpc` to your path.
5050

51-
```bash
52-
$ which shpc
53-
/opt/conda/bin/shpc
54-
```
51+
.. code:: console
52+
53+
$ which shpc
54+
/opt/conda/bin/shpc
55+
5556
5657
This executable should be accessible by an administrator, or anyone that you want
5758
to be able to manage containers. Your user base will be interacting with your
@@ -67,13 +68,13 @@ Once it's installed, you should be able to inspect the client!
6768
$ shpc --help
6869
6970
70-
You'll next want to configure and create your registry, discussed next in
71-
:ref:`getting-started`. Generally, remember that your modules will be installed in
72-
the ``modules`` folder, and container recipes are nested in ``registry``. If you don't
73-
want your container images (sif files) installed alongside your module recipes,
74-
then you can define ``container_base`` to be somewhere else. You
75-
can change these easily with ``shpc config``, as they are defined via these
76-
variables in the config:
71+
You'll next want to configure and create your registry, discussed next in :ref:`getting-started`.
72+
Generally, remember that your modules will be installed in
73+
the ``modules`` folder, and container recipes are nested in ``registry``. If you don't
74+
want your container images (sif files) installed alongside your module recipes,
75+
then you can define ``container_base`` to be somewhere else. You
76+
can change these easily with ``shpc config``, as they are defined via these
77+
variables in the config:
7778

7879

7980
.. code-block:: console
@@ -91,7 +92,12 @@ to tell shpc about this (as it defaults to LMOD):
9192
9293
$ shpc config set module_sys:tcl
9394
94-
You can also easily (manually) update any settings in the ``shpc/settings.yaml`` file.
95+
You can also easily (manually) update any settings in the ``shpc/settings.yaml`` file:
96+
97+
.. code-block:: console
98+
99+
$ shpc config edit
100+
95101
Take a look at this file for other configuration settings, and see the :ref:`getting-started`
96102
pages for next steps for setup and configuration, and interacting with your modules.
97103

docs/getting_started/use-cases.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ And then install a module to your shpc modules directory:
3333
.. code-block:: console
3434
3535
$ shpc install tensorflow/tensorflow
36-
Module tensorflow/tensorflow/2.2.2 was created.
36+
Module tensorflow/tensorflow:2.2.2 was created.
3737
3838
3939
Make sure that lmod knows about the folder
@@ -201,7 +201,7 @@ it could be the case that you want to define custom options at the time of use.
201201
In this case, you can export the following custom environment variables to add them:
202202

203203
**SINGULARITY_OPTS**: will provide additional options to the base Singularity command, such as ``--debug``
204-
**SINGULARITY_COMMAND_OPTS**: will provide additional options to the command (e.g., exec), such as ``--gpu``.
204+
**SINGULARITY_COMMAND_OPTS**: will provide additional options to the command (e.g., exec), such as ``--cleanenv``.
205205

206206

207207
Custom Images that are Added
@@ -218,7 +218,7 @@ And we add it to our unique namespace in the modules folder:
218218

219219
.. code-block:: console
220220
221-
$ shpc add salad_latest.sif vanessa/salad/latest
221+
$ shpc add salad_latest.sif vanessa/salad:latest
222222
223223
224224
We can again load the custom module:
@@ -308,7 +308,7 @@ and in the root we have three recipes:
308308
- Singularity.salad
309309
- Singularity.pokemon
310310

311-
And in the ``VERSION` file in the root, we have ``0.0.1`` which corresponds with
311+
And in the ``VERSION`` file in the root, we have ``0.0.1`` which corresponds with
312312
the GitHub release. This will pull to a container. For example:
313313

314314
.. code-block:: console

docs/getting_started/user-guide.rst

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ software doesn't see the module, remember that you need to have done:
5959

6060
.. code-block:: console
6161
62-
$ module use ./modules
62+
$ module use $(pwd)/modules
6363
6464
6565
We walk through these steps in more detail in the next section.
@@ -101,7 +101,7 @@ And then load the module!
101101
102102
$ module load python/3.9.2-slim
103103
104-
If the module executable as a conflict with something already loaded, it
104+
If the module executable has a conflict with something already loaded, it
105105
will tell you, and it's up to you to unload the conflicting modules before you
106106
try loading again. If you want to quickly see commands that are supported, use module
107107
help:
@@ -158,12 +158,12 @@ variable replacement. A summary table of variables is included below, and then f
158158
- Default
159159
* - module_sys
160160
- Set a default module system. Currently lmod and tcl are supported
161-
- [lmod, tcl]
161+
- lmod
162162
* - registry
163163
- A list of full paths to one or more registry folders (with subfolders with container.yaml recipes)
164164
- [$root_dir/registry]
165165
* - module_base
166-
- The install directory for modules. Defaults to the install directory/modules
166+
- The install directory for modules
167167
- $root_dir/modules
168168
* - container_base
169169
- Where to install containers. If not defined, they are installed alongside modules.
@@ -179,12 +179,12 @@ variable replacement. A summary table of variables is included below, and then f
179179
- null
180180
* - module_name
181181
- Format string for module commands exec,shell,run (not aliases) can include ``{{ registry }}``, ``{{ repository }}``, ``{{ tool }}`` and ``{{ version }}``
182-
- ``{{ tool }}``
182+
- ``'{{ tool }}'``
183183
* - bindpaths
184184
- string with comma separated list of paths to binds. If set, expored to SINGULARITY_BINDPATH
185185
- null
186186
* - singularity_shell
187-
- exported to SINGULARITY_SHELL, defaults to /bin/bash.
187+
- exported to SINGULARITY_SHELL
188188
- /bin/sh
189189
* - podman_shell
190190
- The shell used for podman
@@ -346,7 +346,7 @@ A container identifier is parsed as follows:
346346
.. code-block:: console
347347
348348
# quay.io /biocontainers/samtools:latest
349-
# <registry>/ <repository>/ <tool>/<version>
349+
# <registry>/ <repository>/ <tool>:<version>
350350
351351
352352
So by default, we use tool because it's likely closest to the command that is wanted.
@@ -375,7 +375,7 @@ commands. Aliases that are custom to the container are not modified.
375375

376376

377377
Module Software
378-
===============
378+
---------------
379379

380380
The default module software is currently Lmod, and there is also support for environment
381381
modules that only use tcl (tcl). If you
@@ -400,7 +400,7 @@ The command line argument, if provided, always over-rides the default.
400400

401401

402402
Container Technology
403-
====================
403+
--------------------
404404

405405
The default container technology to pull and then provide to users is Singularity,
406406
and we have also recently added Podman and Docker, and will add support for Shifter and Sarus soon.
@@ -473,7 +473,7 @@ And then to get values:
473473
474474
And to add and remove a value to a list:
475475

476-
.. code-block::console
476+
.. code-block:: console
477477
478478
$ shpc config add registry:/tmp/registry
479479
$ shpc config remove registry:/tmp/registry
@@ -502,12 +502,11 @@ first. To show all entries, you can run:
502502
python
503503
singularityhub/singularity-deploy
504504
505-
The default will not show versions available. To flatten out this list and include
506-
versions for each, you can do:
505+
The default will not show versions available. To flatten out this list and include versions for each, you can do:
507506

508507
.. code-block:: console
509508
510-
$ shpc show
509+
$ shpc show --versions
511510
tensorflow/tensorflow:2.2.2
512511
python:3.9.2-slim
513512
python:3.9.2-alpine
@@ -680,7 +679,7 @@ can do that as follows:
680679

681680
.. code-block:: console
682681
683-
$ shpc inspect python/3.9.2-slim
682+
$ shpc inspect python:3.9.2-slim
684683
👉️ ENVIRONMENT 👈️
685684
/.singularity.d/env/10-docker2singularity.sh : #!/bin/sh
686685
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
@@ -709,14 +708,14 @@ can do that as follows:
709708
We currently don't show the runscript, as they can be very large. However, if you want
710709
to see it:
711710

712-
$ shpc inspect --runscript python/3.9.2-slim
711+
$ shpc inspect --runscript python:3.9.2-slim
713712

714713

715714
Or to get the entire metadata entry dumped as json to the terminal:
716715

717716
.. code-block:: console
718717
719-
$ shpc inspect --json python/3.9.2-slim
718+
$ shpc inspect --json python:3.9.2-slim
720719
721720
722721
.. _getting_started-commands-test:
@@ -799,7 +798,7 @@ we provide the module path relative to your module directory. E.g.,
799798

800799
.. code-block:: console
801800
802-
$ shpc uninstall python/3.9.2-alpine
801+
$ shpc uninstall python:3.9.2-alpine
803802
804803
805804
You can also uninstall an entire family of modules:
@@ -866,7 +865,7 @@ If you want a quick way to shell into an installed module's container
866865

867866
.. code-block:: console
868867
869-
shpc shell vanessa/salad/latest
868+
shpc shell vanessa/salad:latest
870869
Singularity> /code/salad fork
871870
872871
My life purpose: I cut butter.
@@ -956,7 +955,7 @@ is subject to change!)
956955

957956
.. code-block:: console
958957
959-
$ shpc check tensorflow/tensorflow/2.2.2
958+
$ shpc check tensorflow/tensorflow:2.2.2
960959
⭐️ tag 2.2.2 is up to date. ⭐️
961960
962961
As a trick, you can loop through registry entries with ``shpc show``. The return
@@ -978,7 +977,7 @@ the container path and the unique resource identifier:
978977

979978
.. code-block:: console
980979
981-
$ shpc add salad_latest.sif vanessa/salad/latest
980+
$ shpc add salad_latest.sif vanessa/salad:latest
982981
983982
If the unique resource identifier corresponds with a registry entry, you
984983
will not be allowed to create it, as this would create a namespace conflict.
@@ -992,10 +991,10 @@ If you want to quickly get the path to a container binary, you can use get.
992991

993992
.. code-block:: console
994993
995-
$ shpc get vanessa/salad/latest
994+
$ shpc get vanessa/salad:latest
996995
/home/vanessa/Desktop/Code/singularity-hpc/modules/vanessa/salad/latest/vanessa-salad-latest-sha256:8794086402ff9ff9f16c6facb93213bf0b01f1e61adf26fa394b78587be5e5a8.sif
997996
998-
$ shpc get tensorflow/tensorflow/2.2.2
997+
$ shpc get tensorflow/tensorflow:2.2.2
999998
/home/vanessa/Desktop/Code/singularity-hpc/modules/tensorflow/tensorflow/2.2.2/tensorflow-tensorflow-2.2.2-sha256:e2cde2bb70055511521d995cba58a28561089dfc443895fd5c66e65bbf33bfc0.sif
1000999
10011000
If you select a higher level module directory or there is no sif, you'll see:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Resources
6666
`GitHub Repository <https://github.com/singularityhub/singularity-hpc>`_
6767
The code for shpc on GitHub.
6868

69-
`Singularity HPC Library <https://github.com/singularityhub/singularity-hpc/issues>`_
69+
`Singularity HPC Library <https://singularityhub.github.io/singularity-hpc/>`_
7070
Shows modules available to install as containers.
7171

7272
`Autamus Registry <https://autamus.io>`_

0 commit comments

Comments
 (0)