Sign inSign up

laineil/mlflow-inference

By laineil

•Updated 4 months ago

The MLflow Inference (models serve) Apps. Support for x86_64 | arm64 | ppc64le.

Image
0

1.9K

laineil/mlflow-inference repository overview

Docker Pulls Docker Image Size (latest by date) Docker Image Version (latest by date) Static Badge Static Badge GitHub

⁠About MLflow Inference

GitHub Actions in the laineil/containers/app/pysvc⁠ project builds and pushes this image to Docker Hub.

Please visit the project documentation site for help to use and contribute to this image and others.

⁠Image information

⁠Configuration

The container can be easily setup with the following environment variables:

  • MLF_WORKERS: Number of gunicorn worker processes to handle requests. Default: 1
  • MLF_EX_MODEL: Whether to enable mlflow example model (see mlflow-example⁠) or not. Default: enable (disable)
  • MLF_MODEL_URI: Set up the model URI (see Storage Format⁠). Default: exmodel
    • tip: MLF_EX_MODEL=enable <=> MLF_MODEL_URL=exmodel

⁠Run a container

  • Quick start
$ docker run -it \
--name mlflow_infrence \
-p [expose_port]:5000 \
laineil/mlflow-inference:[tag]
  • Recommended example
$ docker run -it \
--name mlflow_infrence \
-v [model_uri_path]:/volume/mlflow/[model_uri] \
-p [expose_port]:5000 \
-e MLF_EX_MODEL=disable \
-e MLF_MODEL_URI=[model_uri] \
laineil/mlflow-inference:[tag]

⁠Verify

  • Use curl to test
$ curl -X POST http://[server_host]:[expose_port]/invocations -H "Content-Type:application/json" -d '{"dataframe_split": {"columns":["fixed acidity", "volatile acidity", "citric acid", "residual sugar", "chlorides", "free sulfur dioxide", "total sulfur dioxide", "density", "pH", "sulphates", "alcohol"],"data":[[6.2, 0.66, 0.48, 1.2, 0.029, 29, 75, 0.98, 3.33, 0.39, 12.8]]}}'
  • Result
{"predictions": [x.xxxxxxxxxxxxxxx]}

⁠Logging

$ docker logs mlflow_infrence

⁠Remove

  • Stop container
$ docker container stop mlflow_infrence
  • Remove container
$ docker container rm mlflow_infrence
  • Remove volume
$ docker volume rm mlflow_infrence

⁠License Agreement

BSD 3-Clause License
Copyright (c) 2023, Laineil
All rights reserved.

Tag summary

Content type

Image

Digest

sha256:7d358f318…

Size

354.2 MB

Last updated

4 months ago

docker pull laineil/mlflow-inference