
Answer-first summary for fast verification
Answer: mlflow.build_docker_image
The correct option is **D. mlflow.build_docker_image**. Here's why: - **mlflow.dockerize_model**: This functionality is deprecated in MLflow 2.0 and has been replaced by `mlflow.build_docker_image`. - **mlflow.create_container**: This option is more about running a containerized model rather than building the Docker image. - **mlflow.serve_model**: This is primarily for serving models within the MLflow ecosystem, not specifically for creating Docker images. - **mlflow.build_docker_image**: This function is specifically designed for building Docker images for MLflow models. It allows for specifying the model URI, target image location, environment configuration, and additional build options, making it the most direct and relevant functionality for the engineer's needs. Therefore, `mlflow.build_docker_image` is the most appropriate command for this scenario, enabling the engineer to build a customized and production-ready Docker image for their MLflow model.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A senior machine learning engineer is looking to deploy a model as a Docker container and expose it as a REST API in a production environment using MLflow. Which MLflow command or functionality should they use to create a Docker image for the model?
A
mlflow.dockerize_model
B
mlflow.create_container
C
mlflow.serve_model
D
mlflow.build_docker_image
No comments yet.