question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] [Roadmap] Support custom docker images for serving

See original GitHub issue

MLflow Roadmap Item

This is an MLflow Roadmap item that has been prioritized by the MLflow maintainers. We’ve identified this feature as a highly requested addition to the MLflow package based on community feedback. We’re seeking a community contribution for the implementation of this feature and will enthusiastically support the development and review of a submitted PR for this.

Contribution Note

As with other roadmap items, there may be a desire for multiple contributors to work on an issue. While we don’t discourage collaboration, we strongly encourage that a primary contributor is assigned to roadmap issues to simplify the merging process. The items on the roadmap are of a high priority. Due to the wide-spread demand of roadmap features, we encourage potential contributors to only agree to take on the work of creating a PR, making changes, and ensuring that test coverage is adequately created for the feature if they are willing and able to see the implementation through to a merged state.

Feature scope

This roadmap feature’s complexity is classified as:

  • good-first-issue: This feature is limited in complexity and effort required to implement.
  • simple: This feature does not require a large amount of effort to implement and / or is clear enough to not need a design discussion with maintainers.
  • involved: This feature will require a substantial amount of development effort but does not require an agreed-upon design from the maintainers. The feedback given during the PR phase may be involved and necessitate multiple iterations before approval. (Please bear with us as we collaborate with you to make a great contribution)
  • design-recommended: This is a substantial feature that should have a design document approved prior to working on an implementation (to save your time, not ours). After agreeing to work on this feature, a maintainer will be assigned to support you throughout the development process.

Proposal Summary

As alluded to in #1963 , #5170 , #4617, and #4596, we would like to support custom ‘base image’ support for model serving.

At its core, this feature should:

  1. Add support for providing a base image definition when building the docker image for a model artifact.
  2. Generate the required python environment using the defined virtualenv as configured in the model artifact’s directory.

As a reference, a PR was filed several years ago that may prove quite useful: #2189 when implementing this feature.

Note: It may be advantageous to supply a simple RFC prior to working on this to minimize the amount of change requests.

Motivation

What is the use case for this feature?

To support custom dependencies required for model serving, to customize the environment that the served model runs in (i.e., add logging support at the serving endpoint, add the ability to containerize custom libraries and file dependencies, define environment variables, etc.).

Why is this use case valuable to support for MLflow users in general?

This has been requested many times over the years. We agree that it is a very useful feature to have.

What component(s), interfaces, languages, and integrations does this feature affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interfaces

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Languages

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dbczumarcommented, Oct 3, 2022

@anuarkaliyev23 has addressed this item by introducing an mlflow models generate-dockerfile API (#6591) that generates a complete Dockerfile for a given model or a Dockerfile for a generic serving image, if --model-uri is omitted. Users can then customize this Dockerfile to their liking before building an imge. Awesome work, @anuarkaliyev23 !

0reactions
fzhcarycommented, Sep 5, 2022

Is this serving python or R models? I am interested

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FR] Custom docker images for models · Issue #1963 - GitHub
With custom dockerfiles you can specify steps for installing different components like compilers or tools of the base image OS. This feature is ......
Read more >
Building Multi-Arch Images for Arm and x86 with Docker Desktop
Docker is making it easier than ever to develop containers on, and for Arm servers and devices. Using the standard tooling and processes...
Read more >
Multi-arch build and images, the simple way | Docker
The question is now, how can we put multiple Docker images, each supporting a different architecture, behind the sametag?
Read more >
How to Build and Test Your Docker Images in the Cloud with ...
In this article, we'll walk through deploying our code to the cloud, how to use Docker Hub to build our images when we...
Read more >
Multi-Platform Docker Builds
Docker images have become a standard tool for testing and deploying new and third-party software.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found