class_docstr: Container builder for building and pushing a Docker image.
class_docstr_tok: ["Container","builder","for","building","and","pushing","a","Docker","image","."]
docstr: Constructor.
  
  Args:
      entry_point: Optional string. File path to the python file or
          iPython notebook that contains the TensorFlow code.
          Note) This path must be in the current working directory tree.
          Example) 'train.py', 'training/mnist.py', 'mnist.ipynb'
          If `entry_point` is not provided, then
          - If you are in an iPython notebook environment, then the
              current notebook is taken as the `entry_point`.
          - Otherwise, the current python script is taken as the
              `entry_point`.
      preprocessed_entry_point: Optional `preprocessed_entry_point`
          file path.
      chief_config: `MachineConfig` that represents the configuration for
          the chief worker in a distribution cluster.
      worker_config: `MachineConfig` that represents the configuration
          for the workers in a distribution cluster.
      requirements_txt: Optional string. File path to requirements.txt
          file containing additionally pip dependencies, if any.
      destination_dir: Optional working directory in the Docker container
          filesystem.
      docker_config: Optional Docker configuration.
      called_from_notebook: Optional boolean which indicates whether run
          has been called in a notebook environment.
docstr_tok: ["Constructor",".","Args",":","entry_point",":","Optional","string",".","File","path","to","the","python","file","or","iPython","notebook","that","contains","the","TensorFlow","code",".","Note",")","This","path","must","be","in","the","current","working","directory","tree",".","Example",")","'train.py","'",",","'training\/mnist.py","'",",","'mnist.ipynb'","If","`","entry_point","`","is","not","provided",",","then","-","If","you","are","in","an","iPython","notebook","environment",",","then","the","current","notebook","is","taken","as","the","`","entry_point","`",".","-","Otherwise",",","the","current","python","script","is","taken","as","the","`","entry_point","`",".","preprocessed_entry_point",":","Optional","`","preprocessed_entry_point","`","file","path",".","chief_config",":","`","MachineConfig","`","that","represents","the","configuration","for","the","chief","worker","in","a","distribution","cluster",".","worker_config",":","`","MachineConfig","`","that","represents","the","configuration","for","the","workers","in","a","distribution","cluster",".","requirements_txt",":","Optional","string",".","File","path","to","requirements.txt","file","containing","additionally","pip","dependencies",",","if","any",".","destination_dir",":","Optional","working","directory","in","the","Docker","container","filesystem",".","docker_config",":","Optional","Docker","configuration",".","called_from_notebook",":","Optional","boolean","which","indicates","whether","run","has","been","called","in","a","notebook","environment","."]
code: def __init__(
      self,
      entry_point,
      preprocessed_entry_point,
      chief_config,
      worker_config,
      requirements_txt=None,
      destination_dir="/app/",
      docker_config=None,
      called_from_notebook=False,
  ):
      """Constructor.
  
      Args:
          entry_point: Optional string. File path to the python file or
              iPython notebook that contains the TensorFlow code.
              Note) This path must be in the current working directory tree.
              Example) 'train.py', 'training/mnist.py', 'mnist.ipynb'
              If `entry_point` is not provided, then
              - If you are in an iPython notebook environment, then the
                  current notebook is taken as the `entry_point`.
              - Otherwise, the current python script is taken as the
                  `entry_point`.
          preprocessed_entry_point: Optional `preprocessed_entry_point`
              file path.
          chief_config: `MachineConfig` that represents the configuration for
              the chief worker in a distribution cluster.
          worker_config: `MachineConfig` that represents the configuration
              for the workers in a distribution cluster.
          requirements_txt: Optional string. File path to requirements.txt
              file containing additionally pip dependencies, if any.
          destination_dir: Optional working directory in the Docker container
              filesystem.
          docker_config: Optional Docker configuration.
          called_from_notebook: Optional boolean which indicates whether run
              has been called in a notebook environment.
      """
      self.entry_point = entry_point
      self.preprocessed_entry_point = preprocessed_entry_point
      self.chief_config = chief_config
      self.worker_config = worker_config
      self.requirements_txt = requirements_txt
      self.destination_dir = destination_dir
      self.docker_config = docker_config
      self.called_from_notebook = called_from_notebook
      self.project_id = gcp.get_project_name()
  
      # Those will be populated lazily.
      self.tar_file_path = None
      self.docker_client = None
      self.tar_file_descriptor = None
      self.docker_file_descriptor = None
  
imports: import logging
  import os
  import sys
  import tarfile
  import tempfile
  import time
  import uuid
  import warnings
  from .None import gcp
  from .None import machine_config
  import docker
  from google.cloud import storage
  from google.cloud.exceptions import NotFound
  from googleapiclient import discovery
  from googleapiclient import errors
  import requests
  from ..utils import google_api_client
  from ..utils import tf_utils
label_desc: Use image node_id 1 to create a new ContainerBuilder object from inherited base classes: object with example: obj = ContainerBuilder(entry_point, preprocessed_entry_point, chief_config, worker_config, requirements_txt, destination_dir, docker_config, called_from_notebook)