Technology1 min read

Deploy R models on Red Hat OpenShift AI with KServe

By · Published by Everything Blog

In short

The deployment architecture relies on containerized tooling such as Podman, Git, the OpenShift CLI, and registries like Quay.io to package and serve assets. Teams build a custom serving runtime based on Red Hat Universal Base Image 9, which runs R 4.4.2 alongside an internal script suite that handles Prometheus metrics, Plumber API V2 routing, and tensor conversions. Models are packaged into OCI-compliant ModelCar container images for automated cluster rollout.

Key points

  • Developers can package predictive assets into ModelCar container images for straightforwa…: Developers can package predictive assets into ModelCar container images for straightforward integration into microservice architectures.
  • The pipeline supports algorithms built using popular packages such as randomForest, range…: The pipeline supports algorithms built using popular packages such as randomForest, ranger, caret, and tidymodels.
  • Assembly relies on standard container tooling including Podman, Git, and image registries…: Assembly relies on standard container tooling including Podman, Git, and image registries like Quay.io.

Sources checked by our analysis pipeline: 1

Hark, my fellow R programmers, the time is upon us to move out of the workbench, package our glorious models in containers, and send them out into the world!

Using containers, Kubernetes, and KServe, we can make our data science models available for workloads, data science pipelines, and applications as microservices. At first, it can feel overwhelming, but Red Hat OpenShift and Red Hat OpenShift AI provide built-in functionality to host models and serve inference requests.

This guide shows you how to build a custom R serving runtime using KServe, import the custom runtime into your cluster, package the model in a ModelCar, and deploy the model on OpenShift AI.

If you prefer to use the prebuilt images rather than building them yourself, start at step 3.

This workflow came from a request from a customer I worked with, and I wanted to share it with the community in the spirit of open source collaboration.

R you ready? Let's get started.

Prerequisites

Ready your tools:

- Podman on your workstation (for building the image)

oc

CLI (for applying manifests on…

Technology