class_docstr: Container builder for building and pushing a Docker image.
class_docstr_tok: ["Container","builder","for","building","and","pushing","a","Docker","image","."]
docstr: Returns the docker image to be used as the default base image.
docstr_tok: ["Returns","the","docker","image","to","be","used","as","the","default","base","image","."]
code: def _get_docker_base_image(self):
      """Returns the docker image to be used as the default base image."""
      # If in a Kaggle environment, use the `KAGGLE_DOCKER_IMAGE` as the base
      # image.
      img = os.getenv("KAGGLE_DOCKER_IMAGE")
      if img:
          return img
  
      tf_version = tf_utils.get_version()
      if tf_version is not None:
          # Updating the name for RC's to match with the TF generated
          # RC Docker image names.
          tf_version = tf_version.replace("-rc", "rc")
          # Get the TF Docker parent image to use based on the current
          # TF version.
          img = "tensorflow/tensorflow:{}".format(tf_version)
          if (
              self.chief_config.accelerator_type
              != machine_config.AcceleratorType.NO_ACCELERATOR
          ):
              img += "-gpu"
  
          # Add python 3 tag for TF version <= 2.1.0
          # https://hub.docker.com/r/tensorflow/tensorflow
          v = tf_version.split(".")
          if float(v[0] + "." + v[1]) <= 2.1:
              img += "-py3"
  
      # Use the latest TF docker image if a local installation is not
      # available or if the docker image corresponding to the `tf_version`
      # does not exist.
      if not (img and self._image_exists(img)):
          warnings.warn(
              "TF Cloud `run` API uses docker, with a TF parent image "
              "matching your local TF version, for containerizing your "
              "code. A TF Docker image does not exist for the TF version "
              "you are using: {}"
              "We are replacing this with the latest stable TF Docker "
              "image available: `tensorflow/tensorflow:latest`"
              "Please see "
              "https://hub.docker.com/r/tensorflow/tensorflow/ "
              "for details on the available Docker images."
              "If you are seeing any code compatibility issues because of"
              " the TF version change, please try using a custom "
              "`docker_config.parent_image` with the required "
              "TF version.".format(tf_version)
          )
          new_img = "tensorflow/tensorflow:latest"
          if img and img.endswith("-gpu"):
              new_img += "-gpu"
          img = new_img
      return img
  
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 5 for calling the ContainerBuilder obj's underlying member method code with example usage: obj._get_docker_base_image() and returns: img, img