You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document will outline how you can run build and run your sample applications within an OpenShift AI workbench.
4
+
5
+
## Prerequisites
6
+
7
+
- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation.
8
+
-`oc` cli installed
9
+
-`oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/
10
+
- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles:
11
+
-`get`, `create`, and `list` for the `pods/portforward` subresource
12
+
13
+
## Running the Sample
14
+
15
+
1) 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
16
+
17
+

18
+
19
+
2) Go to the `Data Science Projects` section and access your application's project named `{{ values.namespace }}`
20
+
21
+

22
+
23
+
3) Access the `workbench` named `{{ values.name }}-notebook`
24
+
25
+

26
+
27
+
4) Go to `File->Open` and select `Terminal`
28
+
29
+

30
+
31
+
5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory
32
+
33
+
6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application
34
+
35
+
7) Run `${{ values.appRunCommand }}` to run the sample in the workbench.
36
+
37
+
## Accessing the Sample
38
+
39
+
With the sample app now running, the following steps will allow you to access the sample app in your browser:
40
+
41
+
1) Navigate back to the OpenShift AI dashboard, and find the name of your workbench.
42
+

43
+
44
+
2) 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.
45
+
46
+
3) Run `oc port-forward <pod-name> ${{ values.appPort }}` to port forward the sample application's port to your local machine.
47
+
48
+
4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application.
0 commit comments