def _make_train_script_file()

in launcher/nemo/slurm_launcher.py [0:0]


    def _make_train_script_file(self):
        """
        Create the custom train_script.sh
        Optional create launch_docker_container.sh to launch docker container on every node
        """
        job_paths = SMJobPaths(folder=self.folder, job_name=self.job_name)
        folder = job_paths.folder
        folder.mkdir(parents=True, exist_ok=True)
        train_script_file_path = job_paths.train_script_file
        with train_script_file_path.open("w") as f:
            f.write(self.train_script_text)
        if self.launch_docker_container_text is not None:
            launch_docker_container_file = job_paths.launch_docker_container_file
            with launch_docker_container_file.open("w") as f:
                f.write(self.launch_docker_container_text)
        if self.docker_exec_script_text is not None:
            docker_exec_script_file = job_paths.docker_exec_script_file
            with docker_exec_script_file.open("w") as f:
                f.write(self.docker_exec_script_text)