Modified conda.yaml to have correct version of protobuf.
- Install Conda v4.9 or latest
- Clone this repo and update the conda.yaml file
- conda env create -f conda.yaml
- conda activate insurance-demo
- python model_run.py
- Download the model to local directory
mlflow artifacts download -r <run-id> -d <local-path>
eg: mlflow artifacts download -r c263bdaa-9505-4dd5-81fa-f9dbf40190fc -d ./output
- Update the conda.yaml file in the downloaded path and add protobuf==3.19.4 in pip dependenicies
- Run the below command to build the image
mlflow models build-docker -n <image-name> -m <local-path>/sgd-regressor
eg: mlflow models build-docker -n lucifer001/mlflow-insurnace-demo:demo1 -m output/sgd-regressor
3.Push the image
- Select serving image which was build in the previous step.
- Serving Port: 8000
- Serving Url Prefix: /invocations
- Min CPU/Max CPU: 1
- Min Memory/Max Memory: 5G
- Copy the curl command from the deployment page
- Change the data section to
-d '{"data": [[31, 1, 22.2, 2, 1, 2]]}'