|
5 | 5 | "id": "9259e514", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | | - "# Submitting a RayJob which lifecycles its own RayCluster\n", |
| 8 | + "# Submitting a RayJob CR\n", |
9 | 9 | "\n", |
10 | 10 | "In this notebook, we will go through the basics of using the SDK to:\n", |
11 | 11 | " * Define a RayCluster configuration\n", |
|
18 | 18 | "id": "18136ea7", |
19 | 19 | "metadata": {}, |
20 | 20 | "source": [ |
21 | | - "## Defining and Submitting the RayJob" |
22 | | - ] |
23 | | - }, |
24 | | - { |
25 | | - "cell_type": "markdown", |
26 | | - "id": "a1c2545d", |
27 | | - "metadata": {}, |
28 | | - "source": [ |
| 21 | + "## Defining and Submitting the RayJob\n", |
29 | 22 | "First, we'll need to import the relevant CodeFlare SDK packages. You can do this by executing the below cell." |
30 | 23 | ] |
31 | 24 | }, |
|
36 | 29 | "metadata": {}, |
37 | 30 | "outputs": [], |
38 | 31 | "source": [ |
39 | | - "from codeflare_sdk import RayJob, ManagedClusterConfig, TokenAuthentication" |
| 32 | + "from codeflare_sdk import RayJob, ManagedClusterConfig" |
40 | 33 | ] |
41 | 34 | }, |
42 | 35 | { |
43 | 36 | "cell_type": "markdown", |
44 | 37 | "id": "649c5911", |
45 | 38 | "metadata": {}, |
46 | 39 | "source": [ |
47 | | - "Execute the below cell to authenticate the notebook via OpenShift.\n", |
48 | | - "\n", |
49 | | - "**TODO: Add guide to authenticate locally.**" |
| 40 | + "Run the below `oc login` command using your Token and Server URL. Ensure the command is prepended by `!` and not `%`. This will work when running both locally and within RHOAI." |
50 | 41 | ] |
51 | 42 | }, |
52 | 43 | { |
|
56 | 47 | "metadata": {}, |
57 | 48 | "outputs": [], |
58 | 49 | "source": [ |
59 | | - "auth = TokenAuthentication(\n", |
60 | | - " token = \"XXXXX\",\n", |
61 | | - " server = \"XXXXX\",\n", |
62 | | - " skip_tls=False\n", |
63 | | - ")\n", |
64 | | - "auth.login()" |
| 50 | + "!oc login --token=<your-token> --server=<your-server-url>" |
65 | 51 | ] |
66 | 52 | }, |
67 | 53 | { |
|
120 | 106 | "id": "f3612de2", |
121 | 107 | "metadata": {}, |
122 | 108 | "source": [ |
123 | | - "We can check the status of our cluster by executing the below cell. If it's not up immediately, run the cell a few more times until you see that it's in a 'running' state." |
| 109 | + "We can check the status of our job by executing the below cell. The status may appear as `unknown` for a time while the RayCluster spins up." |
124 | 110 | ] |
125 | 111 | }, |
126 | 112 | { |
|
0 commit comments