This document will outline how you can run build and run your sample applications within an OpenShift AI workbench.
- Red Hat OpenShift AI installed, and
Create workbench for OpenShift AI
selected during component creation. oc
cli installedoc
can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/
- Permissions to run
oc port-forward
on the cluster, specifically an account with the following roles:get
,create
, andlist
for thepods/portforward
subresource
- While on Console, navigate to the
OpenShift AI
by clicking the square "apps" icon on the top-right corner (next to the notifications icon).Openshift AI
will be listed in the dropdown list
- Go to the
Data Science Projects
section and access your application's project named{{ values.namespace }}
- Access the
workbench
named{{ values.name }}-notebook
- Go to
File->Open
and selectTerminal
-
In the terminal, run
cd ${{ values.name }}
to navigate to your sample app's directory -
Run
pip install --upgrade -r requirements.txt
to install the dependencies for your application -
Run
${{ values.appRunCommand }}
to run the sample in the workbench.
With the sample app now running, the following steps will allow you to access the sample app in your browser:
-
Navigate back to the OpenShift AI dashboard, and find the name of your workbench.
-
In a terminal window on your machine, run
oc get pods -l app=<workbench-name>
. This will retrieve the name of the pod where the workbench is running. -
Run
oc port-forward <pod-name> ${{ values.appPort }}
to port forward the sample application's port to your local machine. -
Finally, visit
http://localhost:${{ values.appPort }}
in your browser to access the application.