<jupyter_start><jupyter_text>R IRIS Model * Wrap an R decision-tree model (using the ```rpart``` library) for use as a prediction microservice in seldon-core   * Run locally on Docker to test   * Deploy on seldon-core running on minikube  Dependencies * [Helm](https://github.com/kubernetes/helm) * [Minikube](https://github.com/kubernetes/minikube) * [S2I](https://github.com/openshift/source-to-image) * R```bashpip install seldon-core``` Train locally<jupyter_code>!Rscript train.R<jupyter_output><empty_output><jupyter_text>Wrap model using s2i<jupyter_code>!s2i build . seldonio/seldon-core-s2i-r:0.3 r-iris:0.1
!docker run --name "iris_predictor" -d --rm -p 5000:5000 r-iris:0.1<jupyter_output>89dde681c929faae32ffa2ddd603399ec2ca725134efc9e8395f4cda28ee6698<jupyter_text>Send some random features that conform to the contract<jupyter_code>!seldon-core-tester contract.json 0.0.0.0 5000 -p
!docker rm iris_predictor --force<jupyter_output>iris_predictor<jupyter_text>Test using Minikube**Due to a [minikube/s2i issue](https://github.com/SeldonIO/seldon-core/issues/253) you will need [s2i >= 1.1.13](https://github.com/openshift/source-to-image/releases/tag/v1.1.13)**<jupyter_code>!minikube start --memory 4096<jupyter_output>😄  minikube v0.34.1 on linux (amd64)
🔥  Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
📶  "minikube" IP address is 192.168.99.100
🐳  Configuring Docker as the container runtime ...
✨  Preparing Kubernetes environment ...
🚜  Pulling images required by Kubernetes v1.13.3 ...
🚀  Launching Kubernetes v1.13.3 using kubeadm ... 
🔑  Configuring cluster permissions ...
🤔  Verifying component health .....
💗  kubectl is now configured to use "minikube"
🏄  Done! Thank you for using minikube!<jupyter_text>Setup Seldon CoreUse the setup notebook to [Setup Cluster](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.htmlSetup-Cluster) with [Ambassador Ingress](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.htmlAmbassador) and [Install Seldon Core](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.htmlInstall-Seldon-Core). Instructions [also online](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.html).  Wrap Model and Test<jupyter_code>!eval $(minikube docker-env) && s2i build . seldonio/seldon-core-s2i-r:0.1 r-iris:0.1
!kubectl create -f r_iris_deployment.json
!kubectl rollout status deploy/r-iris-deployment-r-iris-predictor-0cbaec2
!seldon-core-api-tester contract.json `minikube ip` `kubectl get svc ambassador -o jsonpath='{.spec.ports[0].nodePort}'` \
    seldon-deployment-example --namespace default -p
!minikube delete<jupyter_output>🔥  Deleting "minikube" from virtualbox ...
💔  The "minikube" cluster has been deleted.
StarcoderdataJupyterStructuredCleanDedup