def get_init_container(self): """Pod init container for setting outputs path.""" if self.original_name is not None and self.cloning_strategy == CloningStrategy.RESUME: return [] if self.original_name is not None and self.cloning_strategy == CloningStrategy.COPY: command = InitCommands.COPY original_outputs_path = get_experiment_outputs_path( experiment_name=self.original_name) else: command = InitCommands.CREATE original_outputs_path = None outputs_path = get_experiment_outputs_path( experiment_name=self.experiment_name) outputs_volume_mount = get_volume_mount( volume=constants.DATA_VOLUME, volume_mount=settings.DATA_ROOT) return [ client.V1Container( name=self.init_container_name, image=self.init_docker_image, command=["/bin/sh", "-c"], args=to_list( get_output_args( command=command, outputs_path=outputs_path, original_outputs_path=original_outputs_path)), volume_mounts=[outputs_volume_mount]) ]
def get_init_container(self): """Pod init container for setting outputs path.""" if self.original_name is not None and self.cloning_strategy == CloningStrategy.RESUME: return [] if self.original_name is not None and self.cloning_strategy == CloningStrategy.COPY: command = InitCommands.COPY original_outputs_path = get_experiment_outputs_path(experiment_name=self.original_name) else: command = InitCommands.CREATE original_outputs_path = None outputs_path = get_experiment_outputs_path(experiment_name=self.experiment_name) outputs_volume_mount = get_volume_mount( volume=constants.DATA_VOLUME, volume_mount=settings.DATA_ROOT) return [ client.V1Container( name=self.init_container_name, image=self.init_docker_image, command=["/bin/sh", "-c"], args=to_list(get_output_args(command=command, outputs_path=outputs_path, original_outputs_path=original_outputs_path)), volume_mounts=[outputs_volume_mount]) ]
def get_notebook_code_volume(): volume = get_volume(volume=constants.REPOS_VOLUME, claim_name=conf.get('REPOS_CLAIM_NAME'), host_path=conf.get('REPOS_HOST_PATH')) volume_mount = get_volume_mount(volume=constants.REPOS_VOLUME, volume_mount=conf.get('REPOS_MOUNT_PATH')) return volume, volume_mount
def get_notebook_code_volume(): volume = get_volume(volume=constants.REPOS_VOLUME, claim_name=settings.REPOS_CLAIM_NAME, host_path=settings.REPOS_HOST_PATH) volume_mount = get_volume_mount(volume=constants.REPOS_VOLUME, volume_mount=settings.REPOS_MOUNT_PATH) return volume, volume_mount
def get_notebook_code_volume(): volume = get_volume(volume=constants.REPOS_VOLUME, claim_name=settings.REPOS_CLAIM_NAME, volume_mount=settings.REPOS_ROOT) volume_mount = get_volume_mount(volume=constants.REPOS_VOLUME, volume_mount=settings.REPOS_ROOT) return volume, volume_mount
def get_init_container(self): """Pod init container for setting outputs path.""" outputs_path = get_job_outputs_path(job_name=self.job_name) outputs_volume_mount = get_volume_mount( volume=constants.DATA_VOLUME, volume_mount=settings.DATA_ROOT) return client.V1Container( name=self.init_container_name, image=self.init_docker_image, command=["/bin/sh", "-c"], args=to_list(get_output_args(command=InitCommands.CREATE, outputs_path=outputs_path)), volume_mounts=[outputs_volume_mount])
def get_init_container(self): """Pod init container for setting outputs path.""" outputs_path = get_job_outputs_path(job_name=self.job_name) outputs_volume_mount = get_volume_mount( volume=constants.DATA_VOLUME, volume_mount=settings.DATA_ROOT) return client.V1Container(name=self.init_container_name, image=self.init_docker_image, command=["/bin/sh", "-c"], args=to_list( get_output_args( command=InitCommands.CREATE, outputs_path=outputs_path)), volume_mounts=[outputs_volume_mount])