Kubernetes Server with PVC
import osos.environ["NAMESPACE"] = "seldon-mesh"MESH_IP=!kubectl get svc seldon-mesh -n ${NAMESPACE} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
MESH_IP=MESH_IP[0]
import os
os.environ['MESH_IP'] = MESH_IP
MESH_IP'172.19.255.1'Kind cluster setup
To run this example in Kind we need to start Kind with access to a local folder where are models are location. In this example it is a folder in /tmp and associate that with a path in the container.
cat kind-config.yamlapiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraMounts:
- hostPath: /tmp/models
containerPath: /modelsTo start a Kind cluster see, Learning environment.
Create the local folder for models and copy an example iris sklearn model to it.
Create Server with PVC
Create a storage class and associated persistent colume referencing the /models folder where models are stored.
Now create a new Server based on the provided MLServer configuration but extend it with our PVC by adding this to the rclone container which will allow rclone to move models from this PVC onto the server.
We also add a new capability pvc to allow us to schedule models to this server that has the PVC.
SKLearn Model
Use a simple sklearn iris classification model with the added pvc requirement so that MLServer with the PVC is targeted during scheduling.
Do a gRPC inference call
Last updated
Was this helpful?

