sy

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: BSD-3-Clause Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// BuildPrivilegeKey is the key used in the tool's configuration file to specify if the tool can create images on the platform
	BuildPrivilegeKey = "build_privilege"

	// NoPrivKey is the key used to specify whether Singularity should be executed without any privilege
	NoPrivKey = "force_unprivileged"

	// SudoCmdsKey is the key used to specify which Singularity commands need to be executed with sudo
	SudoCmdsKey = "singularity_sudo_cmds"
)

Variables

This section is empty.

Functions

func CheckIntegrity

func CheckIntegrity(sysCfg *sys.Config) error

CheckIntegrity checks if the installation of Singularity has been compromised

func ConfigFileUpdateEntry

func ConfigFileUpdateEntry(configFile string, key string, value string) error

ConfigFileUpdateEntry updates the value of a key in the tool's configuration file

func Configure

func Configure(env *buildenv.Info, sysCfg *sys.Config, extraArgs []string) error

Configure is the function to call to configure Singularity

func CreateMPIConfigFile

func CreateMPIConfigFile() (string, error)

CreateMPIConfigFile ensures that the configuration file of the tool is correctly created

func GetImageURL

func GetImageURL(mpiCfg *implem.Info, sysCfg *sys.Config) string

GetImageURL returns the URL to pull an image for a given distro/MPI/test

func GetPathToSyMPIConfigFile

func GetPathToSyMPIConfigFile() string

GetPathToSyMPIConfigFile returns the path to the tool's configuration file

func GetSIFArchs

func GetSIFArchs(imgPath string, sysCfg *sys.Config) ([]string, error)

GetSIFArchs returns the list of hardware architectures supported by a given image.

Note that we can have multiple partitions and these partitions can support different hardware architectures

func GetVersion

func GetVersion(sysCfg *sys.Config) string

GetVersion returned the version of Singularity that is currently used

func IsSudoCmd

func IsSudoCmd(cmd string, sysCfg *sys.Config) bool

IsSudoCnd checks whether a command needs to be executed with sudo based on data from the tool's configuration file

func LoadMPIConfigFile

func LoadMPIConfigFile() ([]kv.KV, error)

LoadMPIConfigFile loads the tool's configuration file into a slice of key/value pairs

func LoadSingularityReleaseConf

func LoadSingularityReleaseConf(sysCfg *sys.Config) ([]kv.KV, error)

LoadSingularityReleaseConf loads from the configuration file the list of supported Singularity releases that are supported

func LookupConfig

func LookupConfig(sysCfg *sys.Config) (sys.Config, error)

LookupConfig looks up the configuration of an installation of Singularity (when possible). This is done using the install.MANIFEST created when using SyMPI.

Types

type MPIToolConfig

type MPIToolConfig struct {
	// BuildPrivilege specifies whether or not we can build images on the platform
	BuildPrivilege bool

	// NoPriv specifies whether or not we need to use the '-u' flag with singularity commands
	NoPriv bool
}

MPIToolConfig is the structure hosting the data from the tool's configuration file (~/.singularity/singularity-mpi.conf)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL