code: def build_docker_image(
      dc_pipeline: "towhee.RuntimePipeline",
      image_name: str,
      cuda_version: str,
      format_priority: list,
      parallelism: int = 8,
      inference_server: str = "triton",
  ):
      """
      Build a docker image based on a RuntimePipeline.
  
      Args:
          dc_pipeline ('towhee.RuntimPipeline'):
              The pipeline to build as a model in the docker image.
          image_name (`str`):
              The name of the docker image.
          cuda_version (`str`):
              Cuda version.
          format_priority (`list`):
              The priority order of the model format.
          parallelism (`int`):
              The parallel number.
          inference_server (`str`):
              The inference server.
  
      Examples:
  
      .. code-block:: python
  
          >>> import towhee
          >>> from towhee import pipe, ops
  
          >>> p = (
          ...     pipe.input('url')
          ...         .map('url', 'image', ops.image_decode.cv2_rgb())
          ...         .map('image', 'vec', ops.image_embedding.timm(model_name='resnet50'))
          ...         .output('vec')
          ... )
  
          >>> towhee.build_docker_image(
          ...     dc_pipeline=p,
          ...     image_name='clip:v1',
          ...     cuda_version='11.7',
          ...     format_priority=['onnx'],
          ...     parallelism=4,
          ...     inference_server='triton'
          ... )
      """
  
      server_config = {
          constant.FORMAT_PRIORITY: format_priority,
          constant.PARALLELISM: parallelism,
      }
      if inference_server == "triton":
          DockerImageBuilder(
              dc_pipeline, image_name, server_config, cuda_version
          ).build()
      else:
          engine_log.error("Unknown server type: %s.", inference_server)
          return False
  
imports: import copy
  from .triton.docker_image_builder import DockerImageBuilder
  from .triton.pipeline_builder import Builder
  from .triton import constant
  from towhee.utils.log import engine_log
label_desc: Use image node_id 1 for calling a global function with example usage: build_docker_image(dc_pipeline, image_name, cuda_version, format_priority, parallelism, inference_server) and returns: False