Skip to content

Prototype an integration of ray with Open Data Hub, using a singleuser profile to provision a ray cluster

License

Notifications You must be signed in to change notification settings

erikerlandson/ray-odh-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ray-odh-demo

Prototype an integration of ray with Open Data Hub on OpenShift, using a singleuser profile to provision a ray cluster.

Demo Directions

Prerequisites - This demo assumes:

  1. You have a project namespace in OpenShift to use for your demo, and that you have admin privileges on the cluster to install the Open Data Hub operator, add rolebindings define CRDs, etc.
  2. You have installed the Open Data Hub community operator from the Operator Catalog.
  3. You have created a deployment of the ODH operator into your demo namespace. The only ODH component necessary for this demo is JupyterHub, but others may be installed if desired.

Installing the Ray operator

This demo makes use of the Ray operator. To install the operator, install the following in your demo:

  1. Go to your demo namespace: oc project <your-project-namespace>
  2. Install the CRD for a ray cluster: oc apply -f deploy/operator/ray-cluster-crd.yaml
  3. Run the operator pod: oc apply -f deploy/operator/ray-operator.yaml
  4. You should now see the ray operator running in pod ray-operator-pod
  5. You may optionally test that the operator is working by creating a CR and ensuring it spins a ray cluster: oc apply -f deploy/operator/ray-test-cluster-cr.yaml

To install and run this demo:

This demo makes use of a role-binding to the role ray-operator-role defined for the ray operator during the instructions above.

  1. Run oc apply -f on all the .yaml files in the deploy/odh directory.
  2. Wait a few minutes and log into the JupyterHub launcher via Routes. You should see a new notebook image option ray-minimal-notebook:demo: choose this. If the ray notebook is still not visible, you will need to restart the jupyterhub-xxxx pod so that it reads the new profile you just installed. Simply deleting this pod will cause it to be restarted automatically.
  3. Launch your JupyterHub environment. As part of the startup process, the ODH JupyterHub launcher should also start up a Ray cluster.
  4. Add the git repo https://github.com/erikerlandson/ray-odh-demo.git by clicking on "Git Clone" button on top left of Jupyter and pasting the link to repo.
  5. In Jupyter, navigate to directory ray-odh-demo.git/source and open the demo notebook.
  6. Run the notebook to confirm that it connects to your ray cluster and operates correctly.
  7. You could also see the head and worker nodes created under pods as ray-cluster-$USER-ray-cluster-$USER-head-xxxxx and ray-cluster-$USER-ray-cluster-$USER-worker-xxxxx pods

About

Prototype an integration of ray with Open Data Hub, using a singleuser profile to provision a ray cluster

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published