mlrun / mlrun

MLRun is an open source MLOps platform for quickly building and managing continuous ML applications across their lifecycle. MLRun integrates into your development and CI/CD environment and automates the delivery of production data, ML pipelines, and online applications.
https://mlrun.org
Apache License 2.0
1.42k stars 253 forks source link

[Bug]: MLRun DB and Volume Mount not added to Serving Function #2192

Open nschenone opened 2 years ago

nschenone commented 2 years ago

MLRun Version checks

Reproducible Example

# Serving deployment in quick-start notebook for Docker Compose installation

Issue Description

When deploying a serving function on the docker-compose installation, the function will immediately crash because it cannot find the model. The docker container crashes, but the MLRun/Nuclio UI do not reflect this and it looks like it is still running

Expected Behavior

The serving function should not crash and/or the MLRun/Nuclio UI should update to reflect the crash

Python Version

3.8.8

MLRun Version

1.0.2

Additional Information

Original discussion from MLOps Live Slack Channel. The solution has been found and will be attached, however it still needs to be added to the source code

nschenone commented 2 years ago

The following resolves the issue:

serving_fn.set_env("MLRUN_DBPATH", "http://host.docker.internal:8080/")
serving_fn.spec.volumes = [{'name': 'mlrun-data-mount', 'hostPath': {'path': '/Users/nick/mlrun-data'}}]
serving_fn.spec.volume_mounts = [{'name': 'mlrun-data-mount', 'mountPath': '/home/jovyan/data'}]

This is assuming running in Jupyter and on Mac. The paths should be updated accordingly