Prototype an integration of ray with Open Data Hub, using a singleuser profile to provision a ray cluster
Last updated Oct 6, 2023
14
Stars
7
Forks
0
Issues
0
Stars/day
Attention Score
7
Language breakdown
No language data available.
▸ Files
click to expand
README
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:
- 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.
- You have installed the Open Data Hub community operator from the Operator Catalog.
- 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:
- Go to your demo namespace:
oc project <your-project-namespace> - Install the CRD for a ray cluster:
oc apply -f deploy/operator/ray-cluster-crd.yaml - Run the operator pod:
oc apply -f deploy/operator/ray-operator.yaml - You should now see the ray operator running in pod
ray-operator-pod - 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.
- Run
oc apply -fon all the.yamlfiles in thedeploy/odhdirectory. - 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 thejupyterhub-xxxxpod so that it reads the new profile you just installed. Simply deleting this pod will cause it to be restarted automatically. - Launch your JupyterHub environment. As part of the startup process, the ODH JupyterHub launcher should also start up a Ray cluster.
- Add the git repo
https://github.com/erikerlandson/ray-odh-demo.gitby clicking on "Git Clone" button on top left of Jupyter and pasting the link to repo. - In Jupyter, navigate to directory
ray-odh-demo.git/sourceand open the demo notebook. - Run the notebook to confirm that it connects to your ray cluster and operates correctly.
- You could also see the head and worker nodes created under pods as
ray-cluster-$USER-ray-cluster-$USER-head-xxxxxandray-cluster-$USER-ray-cluster-$USER-worker-xxxxxpods
🔗 More in this category