You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Defines the constructor arguments just once
* Factored out the shell method as it is almost the same between both container technologies
* The DockerContainer doesn't need to know about its subclass any more
* Stop forbidding templates from being named podman.sh
Only use WrapperScript - no more subclasses.
* WrapperScript objects don't have the wrapper_template attribute anymore
* Merged the three generation methods of WrapperScript into one
* Rewrote the template search
- Don't restrict user-defined global templates to be named singularity.sh or
docker.sh as in shpc's default template directory
- Properly defined the search path based on all available template directories
- Minor bugfix: do not search the templates in the current working directory
* Allow using a custom template for aliases
* Turned get_shell_path to a property
Co-authored-by: Matthieu Muffato <[email protected]>
* Allow defining the alternative template script in a long form option rather than hijacking the singularity_scripts section
* Ensure that the wrapper is always defined
* Extracted a function that checks the wrapper exists
and returns where to find it
* Updated the docs to reflect the current wait templates are rendered
* Not used anywhere, so no need to make it a class variable
* Reinstated wrapper_template as a (mandatory) constructor argument
* Further refactoring to split the function that establishes the search path, from the one that finds the template file
* Added a test for the two new methods of WrapperScript
* Fixed the comment
* Pass the config as a kwarg so that we don't need to pass None for the container
* Applied black
Copy file name to clipboardExpand all lines: docs/getting_started/developer-guide.rst
+5-39Lines changed: 5 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,7 @@ about it. For alias wrapper scripts, the following variables are passed for rend
267
267
- Example
268
268
* - alias
269
269
- dictionary
270
-
- The entire alias in question, including subfields name, command, singularity_options or docker_options, and args
270
+
- The entire alias in question, including subfields name, command, singularity_options or docker_options, singularity_script or docker_script, and args
271
271
- ``{{ alias.name }}``
272
272
* - settings
273
273
- dictionary
@@ -304,44 +304,10 @@ If you want to write a custom container.yaml script:
304
304
1. Add either (or both) of singularity_scripts/docker_scripts in the container.yaml, including an alias command and an associated script.
305
305
2. Write the script with the associated name into that folder.
306
306
307
-
The following variables are passed for rendering.
308
-
309
-
.. list-table:: Container YAML Alias Variables
310
-
:widths: 15 15 40 30
311
-
:header-rows: 1
312
-
313
-
* - Name
314
-
- Type
315
-
- Description
316
-
- Example
317
-
* - alias
318
-
- string
319
-
- The alias name defined under singularity_scripts or docker_scripts
320
-
- ``{{ alias }}``
321
-
* - settings
322
-
- dictionary
323
-
- Everything referenced in the user settings
324
-
- ``{{ settings.wrapper_shell }}``
325
-
* - container
326
-
- dictionary
327
-
- The container technology
328
-
- ``{{ container.command }}`` renders to docker, singularity, or podman
329
-
* - config
330
-
- dictionary
331
-
- The entire container config (container.yaml) structured the same
332
-
- ``{{ config.docker }}``
333
-
* - image
334
-
- string
335
-
- The name of the container binary (SIF) or unique resource identifier
336
-
- ``{{ image }}``
337
-
* - module_dir
338
-
- string
339
-
- The name of the module directory
340
-
- ``{{ module_dir }}``
341
-
* - features
342
-
- dictionary
343
-
- A dictionary of parsed features
344
-
- ``{{ features.gpu }}``
307
+
For rendering, the same variables as for alias wrapper scripts are passed,
308
+
**except** ``alias`` which is now a *string* (the name of the alias defined
309
+
under singularity_scripts or docker_scripts) and should be used directly, e.g.
0 commit comments