Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

mlrepa/mlflow-models-deploy-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mlflow-models-deploy-docker

Prebuilt docker image for deploying models via MLflow in docker container.

Build

docker build -t  mlflow_models_deploy_docker .

or - if you want to push image to Docker registry

docker build -t  <username/mlflow_models_deploy_docker> .
docker push <username/mlflow_models_deploy_docker>

Run

With local models storage

docker run -v /path/to/model/on/host:/path/to/model/in/docker \
           -p <port>:<port> \
           mlflow_models_deploy_docker \
           /bin/bash -c \
           "mlflow models serve --no-conda -m /path/to/model/in/docker  --host 0.0.0.0 --port <port> --workers <gunicorn_workers>"

With remote models storage, for example gs://:

docker run -v /host/path/to/google_credentials.json:/docker/path/to/google_credentials.json \
           -p <port>:<port> \
           mlflow_models_deploy_docker \
           /bin/bash -c \
           "export GOOGLE_APPLICATION_CREDENTIALS=/docker/path/to/google_credentials.json && mlflow models serve --no-conda -m <model_uri_in_gs> --host 0.0.0.0 --port <port> --workers <gunicorn_workers>"

Predicting

curl -X POST http://localhost:5000/invocations -H 'Content-Type: application/json; format=pandas-records' -d '[[1,2,3,4,...]]'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published