spack.container.writers package¶
Submodules¶
spack.container.writers.docker module¶
-
class
spack.container.writers.docker.
DockerContext
(config)¶ Bases:
spack.container.writers.PathContext
Context used to instantiate a Dockerfile
-
context_properties
= ['manifest', 'run', 'build', 'strip', 'paths', 'os_packages', 'extra_instructions', 'labels']¶
-
manifest
¶ The spack.yaml file that should be used in the image
-
template_name
= 'container/Dockerfile'¶ Name of the template used for Dockerfiles
-
spack.container.writers.singularity module¶
-
class
spack.container.writers.singularity.
SingularityContext
(config)¶ Bases:
spack.container.writers.PathContext
Context used to instantiate a Singularity definition file
-
context_properties
= ['runscript', 'startscript', 'test', 'help', 'run', 'build', 'strip', 'paths', 'manifest', 'os_packages', 'extra_instructions', 'labels']¶
-
help
¶
-
runscript
¶
-
singularity_config
¶
-
startscript
¶
-
template_name
= 'container/singularity.def'¶ Name of the template used for Singularity definition files
-
test
¶
-
Module contents¶
Writers for different kind of recipes and related convenience functions.
-
class
spack.container.writers.
PathContext
(config)¶ Bases:
spack.tengine.Context
Generic context used to instantiate templates of recipes that install software in a common location and make it available directly via PATH.
-
build
¶ Information related to the build image.
-
context_properties
= ['run', 'build', 'strip', 'paths', 'manifest', 'os_packages', 'extra_instructions', 'labels']¶
-
extra_instructions
¶
-
labels
¶
-
manifest
¶ The spack.yaml file that should be used in the image
-
os_packages
¶ Additional system packages that are needed at run-time.
-
paths
¶ Important paths in the image
-
run
¶ Information related to the run image.
-
strip
¶ Whether or not to strip binaries in the image
-
-
spack.container.writers.
create
(configuration)¶ Returns a writer that conforms to the configuration passed as input.
Parameters: configuration – how to generate the current recipe
-
spack.container.writers.
recipe
(configuration)¶ Returns a recipe that conforms to the configuration passed as input.
Parameters: configuration – how to generate the current recipe
-
spack.container.writers.
writer
(name)¶ Decorator to register a factory for a recipe writer.
Each factory should take a configuration dictionary and return a properly configured writer that, when called, prints the corresponding recipe.