code: def build_docker(
      model_uri=None,
      name="mlflow-pyfunc",
      env_manager=_EnvManager.VIRTUALENV,
      mlflow_home=None,
      install_mlflow=False,
      enable_mlserver=False,
  ):
      """
      Builds a Docker image whose default entrypoint serves an MLflow model at port 8080, using the
      python_function flavor. The container serves the model referenced by ``model_uri``, if
      specified. If ``model_uri`` is not specified, an MLflow Model directory must be mounted as a
      volume into the /opt/ml/model directory in the container.
  
      .. warning::
  
          If ``model_uri`` is unspecified, the resulting image doesn't support serving models with
          the RFunc or Java MLeap model servers.
  
      NB: by default, the container will start nginx and gunicorn processes. If you don't need the
      nginx process to be started (for instance if you deploy your container to Google Cloud Run),
      you can disable it via the DISABLE_NGINX environment variable:
  
      .. code:: bash
  
          docker run -p 5001:8080 -e DISABLE_NGINX=true "my-image-name"
  
      See https://www.mlflow.org/docs/latest/python_api/mlflow.pyfunc.html for more information on the
      'python_function' flavor.
      """
      get_flavor_backend(
          model_uri, docker_build=True, env_manager=env_manager
      ).build_image(
          model_uri,
          name,
          mlflow_home=mlflow_home,
          install_mlflow=install_mlflow,
          enable_mlserver=enable_mlserver,
      )
  
file_path: mlflow/mlflow/models/python_api.py
imports: import json
  import logging
  import os
  from datetime import datetime
  from io import StringIO
  from typing import ForwardRef, List, Optional, get_args, get_origin
  from mlflow.exceptions import MlflowException
  from mlflow.models.flavor_backend_registry import get_flavor_backend
  from mlflow.utils import env_manager
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.proto_json_utils import dump_input_data
label_desc: Use image node_id 1 for calling a global function with example usage: build_docker(model_uri, name, env_manager, mlflow_home, install_mlflow, enable_mlserver) without return types