Warning, file /pilot2/pilot/user/generic/container.py was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 def do_use_container(**kwargs):
0015 """
0016 Decide whether to use a container or not.
0017
0018 :param kwargs: dictionary of key-word arguments.
0019 :return: True is function has decided that a container should be used, False otherwise (boolean).
0020 """
0021
0022 return True
0023
0024
0025 def wrapper(executable, **kwargs):
0026 """
0027 Wrapper function for any container specific usage.
0028 This function will be called by pilot.util.container.execute() and prepends the executable with a container command.
0029
0030 :param executable: command to be executed (string).
0031 :param kwargs: dictionary of key-word arguments.
0032 :return: executable wrapped with container command (string).
0033 """
0034
0035 return executable
0036
0037
0038 def create_stagein_container_command(workdir, cmd):
0039 """
0040 Create the stage-in container command.
0041
0042 The function takes the isolated stage-in command, adds bits and pieces needed for the containerisation and stores
0043 it in a stagein.sh script file. It then generates the actual command that will execute the stage-in script in a
0044 container.
0045
0046 :param workdir: working directory where script will be stored (string).
0047 :param cmd: isolated stage-in command (string).
0048 :return: container command to be executed (string).
0049 """
0050
0051 return cmd