Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ panel, where you can create and manage your project directories.
For detailed guidance on using notebooks on NERC RHOAI JupyterLab, please
refer to [this documentation](../data-science-project/explore-the-jupyterlab-environment.md#working-with-notebooks).

## Clone a Git repository
## Clone a GitHub Repository

You can clone a Git repository in JupyterLab through the left-hand **toolbar** or
the **Git** menu option in the main menu as shown below:
Expand All @@ -58,6 +58,8 @@ Then click on **Clone a Repository** as shown below:
Enter the git repository URL, which points to the end-to-end ML workflows demo
project i.e. [https://github.com/nerc-project/nerc_rhoai_mlops](https://github.com/nerc-project/nerc_rhoai_mlops).

> **<https://github.com/nerc-project/nerc_rhoai_mlops>**

Then click **Clone** button, as shown below:

![NERC RHOAI MLOps Example Project](images/nerc-mlops-git-repo.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/openshift-ai/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ the list below.

- [Configure a Jupyter Notebook to use GPUs for AI/ML modeling](other-projects/configure-jupyter-notebook-use-gpus-aiml-modeling.md)

- [Connect to RHOAI Workbench Kernel from local VS Code](other-projects/connect-vscode-to-rhoai-wb.md)

## Predictive & Generative AI on NERC

- [Predictive & Generative AI (LLM & RAG) in Action](other-projects/predictive-and-generative-AI.md)
Expand Down
6 changes: 4 additions & 2 deletions docs/openshift-ai/other-projects/LLM-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ the GGML project, a general-purpose tensor library.
The library includes command-line tools as well as a server featuring a simple
web interface.

## Standalone Deployment of `llama.cpp` Model Server
## A Standalone Deployment of `llama.cpp` Model Server

- **Prerequisites**:

Expand All @@ -17,7 +17,9 @@ web interface.

### Deployment Steps

1. **Clone** or navigate to [this repository](https://github.com/nerc-project/llm-on-nerc.git).
1. **Clone** or navigate to [this repository](https://github.com/nerc-project/llm-on-nerc).

> **<https://github.com/nerc-project/llm-on-nerc>**

To get started, clone the repository using:

Expand Down
2 changes: 2 additions & 0 deletions docs/openshift-ai/other-projects/RAG-talk-with-your-pdf.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ On the toolbar, click the Git Clone icon:

Enter the following **Git Repo URL**: [https://github.com/nerc-project/llm-on-nerc](https://github.com/nerc-project/llm-on-nerc)

> **<https://github.com/nerc-project/llm-on-nerc>**

Check the Include submodules option, and then click Clone.

![Clone A Repo](images/clone-a-repo.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Then click on **Clone a Repository** as shown below:
Enter the git repository URL, which points to the end-to-end ML workflows demo
project i.e. [https://github.com/rh-aiservices-bu/getting-started-with-gpus](https://github.com/rh-aiservices-bu/getting-started-with-gpus).

> **<https://github.com/rh-aiservices-bu/getting-started-with-gpus>**

Then click **Clone** button, as shown below:

![Getting Started With GPUs Example Project](images/getting-started-with-gpus-git-repo.png)
Expand Down
132 changes: 132 additions & 0 deletions docs/openshift-ai/other-projects/connect-vscode-to-rhoai-wb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Connect to RHOAI Workbench Kernel from local Visual Studio Code (VS Code)

Some users prefer to work directly in their local IDE and run Jupyter notebooks
using a kernel on a remote workbench hosted on NERC's RHOAI. While most IDEs
support connecting to a remote kernel as a standard feature, this does not work
with RHOAI due to its authentication setup.

Typically, IDEs use token-based authentication to connect to remote kernels. However
workbench pods in RHOAI include an authentication layer in front of the workbench
container that manages user access. This layer relies on OpenShift's authentication
mechanism, which is not compatible with the standard remote kernel connection
features provided by most IDEs.

## Workaround: Connect to the remote kernel using Openshift port-forwarding

Use the following steps to connect your local VS Code to RHOAI Workbench kernel:

- In your RHOAI data science project, create a workbench that you intend to use
as your remote kernel. If you require a GPU accelerator, choose a compatible
workbench image (i.e. PyTorch, TensorFlow based Workbench image).

![Create workbench](images/open-object-detection-jupyter-lab.png)

- Open the workbench and copy the context path from the browser. You will need
this (i.e. `notebook/<your-project-namespace>/object-detection/lab`) later
when connecting from VS Code locally.

![Workbench context path](images/workbench-context-path.png)

- Make sure you have the `oc` CLI tool installed and configured on your local
machine following [these steps](../../openshift/logging-in/setup-the-openshift-cli.md#first-time-usage).

- From terminal on your laptop/desktop login to the NERC OpenShift cluster and
switch to your project namespace:

```sh
oc login --token=<your_token> --server=https://api.shift.nerc.mghpcc.org:6443
```

For example:

```sh
oc login --token=<your_token> --server=https://api.shift.nerc.mghpcc.org:6443
Logged into "https://api.shift.nerc.mghpcc.org:6443" as "<your_account>" using the token provided.
```

!!! info "Information"

Some users may have access to multiple projects. Run the following command
to switch to a specific project space: `oc project <your-project-namespace>`.

- Switch to your data science project:

Please confirm the correct project is being selected by running `oc project`,
as shown below:

oc project
Using project "<your-project-namespace>" on server "https://api.shift.nerc.mghpcc.org:6443".

- Start port-forwarding to your workbench pod:

i. List all the pods in your project. The pod running your workbench is named
based on your workbench name in RHOAI. For example, `object-detection-0`
corresponds to a workbench named `Object Detection`.

![Port-forward to wb pod](images/port-forwarding.png)

> **Note:** Capital letters are converted to lowercase, and spaces are replaced
with hyphens (`-`).

ii. Enable port-forwarding to your workbench pod. You need to forward to the
port the pod is listening on. It is usually `8888` for RHOAI workbench.
You can find this port from the service in your project with name same
as your workbench.

- Open the Jupyter notebook in your local VS Code

![Jupyter Notebook](images/jupyter-nb.png)

- From the top right corner of the notebook, click on `Select Kernel`.

![Select Kernel](images/select-kernel.png)

- From the options, select `Existing Jupyter Server` and then enter the url as
follows:

![Existing Jupyter Server](images/existing-jupyter-server.png)

`localhost` `[:port]` `/context-path` copied earlier that has the pattern
`/notebook/ds-project-name/workbench-name/lab`. e.g. `http://localhost:8888/notebook/<your-project-namespace>/object-detection/lab`
and then press `Enter` to confirm.

![Existing Jupyter Server URL](images/jupyter-server-url.png)

- A prompt saying: `Connecting over HTTP without a token may be an insecure
connection. Do you want to connect to a possibly insecure server?` is displayed.
select `Yes`.

![Insecure connection prompt](images/connect-over-http.png)

- Select the prompted `Server display name` or enter a new one and then press
`Enter` to confirm.

![Server display name](images/name-connection.png)

- A list of available kernels is displayed. Choose `Python 3.9`.

![Select Kernel](images/select-remote-kernel.png)

- You should see the selected Kernel in the top right corner.

![Remote kernel selected](images/remote-kernel-selected.png)

- The code inside of your notebook will now execute using the remote kernel on
the RHOAI workbench pod.

- If your workbench uses a NVIDIA GPU, you can verify that it is being used in
the execution of your notebook by adding a command `!nvidia-smi`. You should
see output similar to the image below.

![Nvidia GPU used ](images/nvidia-gpu-used.png)

## Caveats

- Jupyter notebooks in your local VS Code environment will not be saved to the
workbench.

- If your notebook uses any files (models, inputdata etc.), they should be
present on the workbench and their path should match the path specified in
your notebook.

---
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,9 @@ curl -k -X POST https://<external-url>/v1/chat/completions \
For a more user-friendly experience, integrate with [Open WebUI](https://docs.openwebui.com/)
as follows:

1. **Clone** or navigate to [this repository](https://github.com/nerc-project/llm-on-nerc.git).
1. **Clone** or navigate to [this repository](https://github.com/nerc-project/llm-on-nerc).

> **<https://github.com/nerc-project/llm-on-nerc>**

To get started, clone the repository using:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,8 @@ On the toolbar, click the Git Clone icon:

Enter the following **Git Repo URL**: [https://github.com/nerc-project/fraud-detection](https://github.com/nerc-project/fraud-detection)

> **<https://github.com/nerc-project/fraud-detection>**

Check the Include submodules option, and then click Clone.

![Clone A Repo](images/clone-a-repo.png)
Expand Down Expand Up @@ -1455,6 +1457,8 @@ menu as shown below:

![Import from Git - Right-click](images/Import_from_Git-right-click.png)

> **<https://github.com/nerc-project/fraud-detection>**

In the "Git Repo URL" enter: `https://github.com/nerc-project/fraud-detection` (this
is the same repository you [pulled into RHOAI earlier](#importing-the-tutorial-files-into-the-jupyter-environment)).
Then press "Show advanced Git options" and set "Context dir" to "/application"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Then click on **Clone a Repository** as shown below:
Enter the git repository URL, which points to the end-to-end ML workflows demo
project i.e. [https://github.com/rh-aiservices-bu/access-s3-data](https://github.com/rh-aiservices-bu/access-s3-data).

> **<https://github.com/rh-aiservices-bu/access-s3-data>**

Then click **Clone** button, as shown below:

![Access, Download and Analysis Example Project](images/access-download-and-analysis-s3-data-git-repo.png)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,8 @@ On the toolbar, click the Git Clone icon:

Enter the following **Git Repo URL**: [https://github.com/nerc-project/object-detection](https://github.com/nerc-project/object-detection)

> **<https://github.com/nerc-project/object-detection>**

Check the Include submodules option, and then click Clone.

![Clone A Repo](images/clone-a-repo.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ On NERC, we offer various solutions to handle LLM serving.

#### As a Standalone Deployment

In [this repository](https://github.com/nerc-project/llm-on-nerc.git), you
In [this repository](https://github.com/nerc-project/llm-on-nerc), you
will find:

- **Deployment Recipes** for various LLM servers as standalone deployments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ On the toolbar, click the Git Clone icon:

Enter the following **Git Repo URL**: [https://github.com/nerc-project/llm-on-nerc](https://github.com/nerc-project/llm-on-nerc)

> **<https://github.com/nerc-project/llm-on-nerc>**

Check the Include submodules option, and then click Clone.

![Clone A Repo](images/clone-a-repo.png)
Expand Down
14 changes: 9 additions & 5 deletions docs/openshift/applications/creating-a-sample-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ tasks using both the web console and the command-line tool.

- **Option 3:** Using the DevFile that is found in the Git Repo.

In the **Git Repo URL** text box, enter your git repo url. For example: `https://github.com/myuser/mypublicrepo.git`.
In the **Git Repo URL** text box, enter your git repo url. For example: `https://github.com/<github_username>/mypublicrepo`.

> **`https://github.com/<github_username>/mypublicrepo`**

!!! tip "Best Practices for Container Permissions in OpenShift"

Expand Down Expand Up @@ -117,9 +119,11 @@ the following command:

iii. If you want to create an application from an existing Git repository, you can
use the `--code` flag to specify the URL of the repository. For example:
`oc new-app --code https://github.com/myuser/mypublicrepo`. If you want to use a
different name, you can add the `--name=<newname>` argument to the `oc new-app` command.
For example: `oc new-app --name=mytestapp https://github.com/myuser/mypublicrepo`.
`oc new-app --code https://github.com/<github_username>/mypublicrepo`. If you want
to use a different name, you can add the `--name=<newname>` argument to the
`oc new-app` command.

For example: `oc new-app --name=mytestapp https://github.com/<github_username>/mypublicrepo`.
The platform will try to automatically [detect the programming language](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/building_applications/creating-applications#language-detection_creating-applications-using-cli)
of the application code and select the latest version of the base language image
available. If `oc new-app` can't find any suitable Source-To-Image (S2I) builder
Expand All @@ -128,7 +132,7 @@ language or detects the wrong one, you can always specify the image you want to
as part of the new-app argument, with `oc new-app <image url>~<git url>`. If it is
using a test application based on Node.js, we could use the same command as before
but add `nodejs~` before the URL of the Git repository.
For example: `oc new-app nodejs~https://github.com/myuser/mypublicrepo`.
For example: `oc new-app nodejs~https://github.com/<github_username>/mypublicrepo`.

!!! note "Important Note"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ the RStudio server from that template.
This example template file is readily accessible from the
[Git Repository](https://github.com/nerc-project/rstudio-testapp).

> **<https://github.com/nerc-project/rstudio-testapp>**

To get started, clone the repository using:

```sh
Expand Down
4 changes: 3 additions & 1 deletion docs/openshift/storage/Rclone.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ is mature, open-source software originally inspired by **rsync** and written in

#### Steps

1. **Clone** or navigate to [this repository](https://github.com/nerc-project/rclone-web-on-openshift.git).
1. **Clone** or navigate to [this repository](https://github.com/nerc-project/rclone-web-on-openshift).

> **<https://github.com/nerc-project/rclone-web-on-openshift>**

To get started, clone the repository using:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ To get started, clone the repository using:
git clone https://github.com/nerc-project/terraform-nerc.git
```

> **<https://github.com/nerc-project/terraform-nerc>**

Then run this base template for terraform to provision some basic NERC's OpenStack
resources within this repo.

Expand All @@ -46,6 +48,8 @@ To get started, clone the repository using:
git clone https://github.com/nerc-project/terraform-nerc-r-shiny.git
```

> **<https://github.com/nerc-project/terraform-nerc-r-shiny>**

Then you can run this template locally using terraform to provision
[R Shiny server](https://www.rstudio.com/products/shiny/shiny-server/) on NERC's
OpenStack resources within this repo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ To create a fork of the example `simple-node-app` repository:

- Go to [https://github.com/nerc-project/simple-node-app](https://github.com/nerc-project/simple-node-app).

> **<https://github.com/nerc-project/simple-node-app>**

- Click the "Fork" button to create a fork in your own GitHub account, e.g.
"`https://github.com/<github_username>/simple-node-app`".

Expand Down Expand Up @@ -108,7 +110,7 @@ cd simple-node-app
```

This branch includes the necessary
**[GitHub Actions workflow file](https://github.com/<github_username>/simple-node-app/blob/with_pvc/.github/workflows/openshift.yml)**
**[GitHub Actions workflow file](`https://github.com/<github_username>/simple-node-app/blob/with_pvc/.github/workflows/openshift.yml`)**
for mounting a PVC inside the container so that data can be
**persisted across pod restarts and container rebuilds**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ To create a fork of the example `nodeapp` repository:

1. Go to [https://github.com/nerc-project/nodeapp](https://github.com/nerc-project/nodeapp).

> **<https://github.com/nerc-project/nodeapp>**

2. Click the "Fork" button to create a fork in your own GitHub account, e.g. "`https://github.com/<github_username>/nodeapp`".

![How to Fork Github Repo](images/github-repo-fork.png)
Expand Down
6 changes: 6 additions & 0 deletions docs/other-tools/R/r-shiny-server/running-rshiny-on-NERC.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on your NERC OpenStack.

To get started, you will need to clone the repository using:

> **<https://github.com/nerc-project/terraform-nerc-r-shiny>**

```sh
git clone https://github.com/nerc-project/terraform-nerc-r-shiny.git
```
Expand Down Expand Up @@ -60,6 +62,8 @@ To create a fork of the example `rshiny-testapp` repository:

- Go to [https://github.com/nerc-project/rshiny-testapp](https://github.com/nerc-project/rshiny-testapp).

> **<https://github.com/nerc-project/rshiny-testapp>**

- Click the "Fork" button to create a fork in your own GitHub account, e.g. "`https://github.com/<github_username>/rshiny-testapp`".

![How to Fork Github Repo](images/rshiny-repo-fork-github.png)
Expand Down Expand Up @@ -136,6 +140,8 @@ An OpenShift template file, `rshiny-server-template.yaml`, is available within t
[Git Repository](https://github.com/nerc-project/rshiny-testapp) under the
`openshift` directory.

> **<https://github.com/nerc-project/rshiny-testapp>**

!!! note "More about Writing Templates"

For more options and customization please [read this](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/building_applications/creating-applications#templates-writing_using-templates).
Expand Down
2 changes: 2 additions & 0 deletions docs/other-tools/R/rstudio-server/running-rstudio-on-NERC.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ RStudio server from that template.

To get started, clone the repository by running:

> **<https://github.com/nerc-project/rshiny-testapp>**

```sh
git clone https://github.com/nerc-project/rstudio-testapp.git
```
Expand Down
Loading