def __init__(self, docker_images): """ :param list(DockerImage) docker_images: nonempty list of Docker images, at least one should be available for this environment to be supported. :return: """ if docker_images is None: raise AttributeError("docker_images is None") self.docker_images = docker_images Environment.__init__(self) self.software.append('Docker')
def __init__(self, tag=None, image_id=None, additional_images: List[DockerImage] = None): if tag is None: tag = self.DOCKER_TAG image = DockerImage(image_id=image_id) if image_id \ else DockerImage(self.DOCKER_IMAGE, tag=tag) Environment.__init__(self) self.main_program_file = find_task_script(self.APP_DIR, self.SCRIPT_NAME) self.docker_images = [image] if additional_images: self.docker_images += additional_images if self.SHORT_DESCRIPTION: self.short_description = self.SHORT_DESCRIPTION