Quick Testing of Data Science Applications on Red Hat OpenShift AI without creating a container image

Balkrishna Pandey
4 min readJun 6, 2024

Developing data science applications often requires rapid testing and iteration. If you’re using Red Hat OpenShift AI (RHOAI), you can set up a temporary testing environment that allows you to bypass the complexities of containerization during the initial development phase. This guide outlines a simple workaround to test your applications directly from your local machine or using DNS.

Create a Simple Web Application

Let’s start by creating a basic web application within your RHOAI environment. Use the terminal in your RHOAI workbench to create an HTML file named index.html. This file will contain a greeting message that acknowledges the RHOAI environment:

echo "<h1>Hello world from Red Hat OpenShift AI<br/></h1>" > index.html

Now run a simple HTTP server to serve your page by executing:

python -m http.server

You should see output similar to this,

Create a Kubernetes Service

Next create a Kubernetes Service, to manage access to your application:

kind: Service
apiVersion: v1
metadata:
name: <workbench-name>-custom-app
spec:
ports…

--

--