Skip to content

Commit ff95ed4

Browse files
Maxusmustiopenshift-merge-robot
authored andcommitted
Updated basic_instascale nb
1 parent 01e0582 commit ff95ed4

File tree

2 files changed

+110
-12
lines changed

2 files changed

+110
-12
lines changed

demo-notebooks/guided-demos/notebook-ex-outputs/1_basic_instascale.ipynb

Lines changed: 84 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"cell_type": "code",
13-
"execution_count": null,
13+
"execution_count": 1,
1414
"id": "b55bc3ea-4ce3-49bf-bb1f-e209de8ca47a",
1515
"metadata": {},
1616
"outputs": [],
@@ -46,10 +46,18 @@
4646
},
4747
{
4848
"cell_type": "code",
49-
"execution_count": null,
49+
"execution_count": 2,
5050
"id": "0f4bc870-091f-4e11-9642-cba145710159",
5151
"metadata": {},
52-
"outputs": [],
52+
"outputs": [
53+
{
54+
"name": "stdout",
55+
"output_type": "stream",
56+
"text": [
57+
"Written to: instascaletest.yaml\n"
58+
]
59+
}
60+
],
5361
"source": [
5462
"# Create and configure our cluster object (and appwrapper)\n",
5563
"cluster = Cluster(ClusterConfiguration(\n",
@@ -76,10 +84,19 @@
7684
},
7785
{
7886
"cell_type": "code",
79-
"execution_count": null,
87+
"execution_count": 3,
8088
"id": "f0884bbc-c224-4ca0-98a0-02dfa09c2200",
8189
"metadata": {},
82-
"outputs": [],
90+
"outputs": [
91+
{
92+
"name": "stdout",
93+
"output_type": "stream",
94+
"text": [
95+
"Waiting for requested resources to be set up...\n",
96+
"Requested cluster up and running!\n"
97+
]
98+
}
99+
],
83100
"source": [
84101
"# Bring up the cluster\n",
85102
"cluster.up()\n",
@@ -98,10 +115,68 @@
98115
},
99116
{
100117
"cell_type": "code",
101-
"execution_count": null,
118+
"execution_count": 4,
102119
"id": "7fd45bc5-03c0-4ae5-9ec5-dd1c30f1a084",
103120
"metadata": {},
104-
"outputs": [],
121+
"outputs": [
122+
{
123+
"data": {
124+
"text/html": [
125+
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-style: italic\"> </span><span style=\"font-weight: bold; font-style: italic\"> 🚀 CodeFlare Cluster Details 🚀</span><span style=\"font-style: italic\"> </span>\n",
126+
"<span style=\"font-weight: bold\"> </span>\n",
127+
" ╭─────────────────────────────────────────────────────────────────────╮ \n",
128+
" │ <span style=\"color: #c0c0c0; text-decoration-color: #c0c0c0; background-color: #008000; font-weight: bold\">Name</span> │ \n",
129+
" │ <span style=\"font-weight: bold; text-decoration: underline\">instascaletest</span> Active ✅ │ \n",
130+
" │ │ \n",
131+
" │ <span style=\"font-weight: bold\">URI:</span> ray://instascaletest-head-svc.default.svc:10001 │ \n",
132+
" │ │ \n",
133+
" │ <a href=\"http://ray-dashboard-instascaletest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\" target=\"_blank\"><span style=\"color: #000080; text-decoration-color: #000080; text-decoration: underline\">Dashboard🔗</span></a> │ \n",
134+
" │ │ \n",
135+
" │ <span style=\"font-style: italic\"> Cluster Resources </span> │ \n",
136+
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n",
137+
" │ │ <span style=\"font-weight: bold\"> # Workers </span> │ │ <span style=\"font-weight: bold\"> Memory CPU GPU </span> │ │ \n",
138+
" │ │ <span style=\"color: #800080; text-decoration-color: #800080\"> </span> │ │ <span style=\"color: #008080; text-decoration-color: #008080\"> </span><span style=\"color: #800080; text-decoration-color: #800080\"> </span> │ │ \n",
139+
" │ │ <span style=\"color: #800080; text-decoration-color: #800080\"> 2 </span> │ │ <span style=\"color: #008080; text-decoration-color: #008080\"> 8~8 </span><span style=\"color: #800080; text-decoration-color: #800080\"> 2 1 </span> │ │ \n",
140+
" │ │ <span style=\"color: #800080; text-decoration-color: #800080\"> </span> │ │ <span style=\"color: #008080; text-decoration-color: #008080\"> </span><span style=\"color: #800080; text-decoration-color: #800080\"> </span> │ │ \n",
141+
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n",
142+
" ╰─────────────────────────────────────────────────────────────────────╯ \n",
143+
"</pre>\n"
144+
],
145+
"text/plain": [
146+
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 CodeFlare Cluster Details 🚀\u001b[0m\u001b[3m \u001b[0m\n",
147+
"\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
148+
" ╭─────────────────────────────────────────────────────────────────────╮ \n",
149+
"\u001b[1;37;42mName\u001b[0m │ \n",
150+
"\u001b[1;4minstascaletest\u001b[0m Active ✅ │ \n",
151+
" │ │ \n",
152+
"\u001b[1mURI:\u001b[0m ray://instascaletest-head-svc.default.svc:10001 │ \n",
153+
" │ │ \n",
154+
"\u001b]8;id=65933;http://ray-dashboard-instascaletest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\u001b\\\u001b[4;34mDashboard🔗\u001b[0m\u001b]8;;\u001b\\\n",
155+
" │ │ \n",
156+
"\u001b[3m Cluster Resources \u001b[0m │ \n",
157+
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n",
158+
" │ │ \u001b[1m \u001b[0m\u001b[1m# Workers\u001b[0m\u001b[1m \u001b[0m │ │ \u001b[1m \u001b[0m\u001b[1mMemory \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1mCPU \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1mGPU \u001b[0m\u001b[1m \u001b[0m │ │ \n",
159+
" │ │ \u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \n",
160+
" │ │ \u001b[35m \u001b[0m\u001b[35m2 \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m8~8 \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m2 \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m1 \u001b[0m\u001b[35m \u001b[0m │ │ \n",
161+
" │ │ \u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \n",
162+
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n",
163+
" ╰─────────────────────────────────────────────────────────────────────╯ \n"
164+
]
165+
},
166+
"metadata": {},
167+
"output_type": "display_data"
168+
},
169+
{
170+
"data": {
171+
"text/plain": [
172+
"RayCluster(name='instascaletest', status=<RayClusterStatus.READY: 'ready'>, workers=2, worker_mem_min=8, worker_mem_max=8, worker_cpu=2, worker_gpu=1, namespace='default', dashboard='http://ray-dashboard-instascaletest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org')"
173+
]
174+
},
175+
"execution_count": 4,
176+
"metadata": {},
177+
"output_type": "execute_result"
178+
}
179+
],
105180
"source": [
106181
"cluster.details()"
107182
]
@@ -116,7 +191,7 @@
116191
},
117192
{
118193
"cell_type": "code",
119-
"execution_count": null,
194+
"execution_count": 5,
120195
"id": "5f36db0f-31f6-4373-9503-dc3c1c4c3f57",
121196
"metadata": {},
122197
"outputs": [],
@@ -159,7 +234,7 @@
159234
"name": "python",
160235
"nbconvert_exporter": "python",
161236
"pygments_lexer": "ipython3",
162-
"version": "3.8.13"
237+
"version": "3.8.17"
163238
},
164239
"vscode": {
165240
"interpreter": {

demo-notebooks/guided-demos/notebook-ex-outputs/instascaletest.yaml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,20 @@ spec:
6868
values:
6969
- instascaletest
7070
containers:
71-
- image: ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103
71+
- env:
72+
- name: MY_POD_IP
73+
valueFrom:
74+
fieldRef:
75+
fieldPath: status.podIP
76+
- name: RAY_USE_TLS
77+
value: '0'
78+
- name: RAY_TLS_SERVER_CERT
79+
value: /home/ray/workspace/tls/server.crt
80+
- name: RAY_TLS_SERVER_KEY
81+
value: /home/ray/workspace/tls/server.key
82+
- name: RAY_TLS_CA_CERT
83+
value: /home/ray/workspace/tls/ca.crt
84+
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
7285
imagePullPolicy: Always
7386
lifecycle:
7487
preStop:
@@ -94,7 +107,8 @@ spec:
94107
cpu: 2
95108
memory: 8G
96109
nvidia.com/gpu: 0
97-
rayVersion: 1.12.0
110+
imagePullSecrets: []
111+
rayVersion: 2.1.0
98112
workerGroupSpecs:
99113
- groupName: small-group-instascaletest
100114
maxReplicas: 2
@@ -125,7 +139,15 @@ spec:
125139
valueFrom:
126140
fieldRef:
127141
fieldPath: status.podIP
128-
image: ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103
142+
- name: RAY_USE_TLS
143+
value: '0'
144+
- name: RAY_TLS_SERVER_CERT
145+
value: /home/ray/workspace/tls/server.crt
146+
- name: RAY_TLS_SERVER_KEY
147+
value: /home/ray/workspace/tls/server.key
148+
- name: RAY_TLS_CA_CERT
149+
value: /home/ray/workspace/tls/ca.crt
150+
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
129151
lifecycle:
130152
preStop:
131153
exec:
@@ -143,6 +165,7 @@ spec:
143165
cpu: 2
144166
memory: 8G
145167
nvidia.com/gpu: 1
168+
imagePullSecrets: []
146169
initContainers:
147170
- command:
148171
- sh

0 commit comments

Comments
 (0)