@classmethod<EOL><INDENT>def build_pipeline(cls, project, zones, min_cores, min_ram, disk_size,<EOL>boot_disk_size, preemptible, accelerator_type,<EOL>accelerator_count, image, script_name, envs, inputs,<EOL>outputs, pipeline_name):<DEDENT>
if min_cores is None:<EOL><INDENT>min_cores = job_model.DEFAULT_MIN_CORES<EOL><DEDENT>if min_ram is None:<EOL><INDENT>min_ram = job_model.DEFAULT_MIN_RAM<EOL><DEDENT>if disk_size is None:<EOL><INDENT>disk_size = job_model.DEFAULT_DISK_SIZE<EOL><DEDENT>if boot_disk_size is None:<EOL><INDENT>boot_disk_size = job_model.DEFAULT_BOOT_DISK_SIZE<EOL><DEDENT>if preemptible is None:<EOL><INDENT>preemptible = job_model.DEFAULT_PREEMPTIBLE<EOL><DEDENT>docker_command = cls._build_pipeline_docker_command(script_name, inputs,<EOL>outputs, envs)<EOL>input_envs = [{<EOL>'<STR_LIT:name>': SCRIPT_VARNAME<EOL>}] + [{<EOL>'<STR_LIT:name>': env.name<EOL>} for env in envs if env.value]<EOL>input_files = [<EOL>cls._build_pipeline_input_file_param(var.name, var.docker_path)<EOL>for var in inputs<EOL>if not var.recursive and var.value<EOL>]<EOL>output_files = [<EOL>cls._build_pipeline_file_param(var.name, var.docker_path)<EOL>for var in outputs<EOL>if not var.recursive and var.value<EOL>]<EOL>return {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': project,<EOL>'<STR_LIT:name>': pipeline_name,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': min_cores,<EOL>'<STR_LIT>': min_ram,<EOL>'<STR_LIT>': boot_disk_size,<EOL>'<STR_LIT>': preemptible,<EOL>'<STR_LIT>': google_base.get_zones(zones),<EOL>'<STR_LIT>': accelerator_type,<EOL>'<STR_LIT>': accelerator_count,<EOL>'<STR_LIT>': [{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT>': disk_size,<EOL>'<STR_LIT>': providers_util.DATA_MOUNT_POINT,<EOL>}],<EOL>},<EOL>'<STR_LIT>': input_envs + input_files,<EOL>'<STR_LIT>': output_files,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': image,<EOL>'<STR_LIT>': docker_command,<EOL>}<EOL>}<EOL>}<EOL>
Builds a pipeline configuration for execution.

        Args:
          project: string name of project.
          zones: list of zone names for jobs to be run at.
          min_cores: int number of CPU cores required per job.
          min_ram: int GB of RAM required per job.
          disk_size: int GB of disk to attach under /mnt/data.
          boot_disk_size: int GB of disk for boot.
          preemptible: use a preemptible VM for the job
          accelerator_type: string GCE defined accelerator type.
          accelerator_count: int number of accelerators of the specified type to
            attach.
          image: string Docker image name in which to run.
          script_name: file name of the script to run.
          envs: list of EnvParam objects specifying environment variables to set
            within each job.
          inputs: list of FileParam objects specifying input variables to set
            within each job.
          outputs: list of FileParam objects specifying output variables to set
            within each job.
          pipeline_name: string name of pipeline.

        Returns:
          A nested dictionary with one entry under the key ephemeralPipeline
          containing the pipeline configuration.