Skip to content

Commit 804cbb6

Browse files
Maxusmustiopenshift-merge-robot
authored andcommitted
Surrounding prep for final two notebook updates
1 parent ff95ed4 commit 804cbb6

File tree

6 files changed

+51
-11
lines changed

6 files changed

+51
-11
lines changed

demo-notebooks/guided-demos/3_basic_interactive.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@
140140
"#install additional libraries that will be required for model training\n",
141141
"runtime_env = {\"pip\": [\"transformers\", \"datasets\", \"evaluate\", \"pyarrow<7.0.0\", \"accelerate\"]}\n",
142142
"\n",
143-
"ray.init(address=f'{ray_cluster_uri}', runtime_env=runtime_env)\n",
143+
"# NOTE: This will work for in-cluster notebook servers (RHODS/ODH), but not for local machines\n",
144+
"# To see how to connect from your laptop, go to demo-notebooks/additional-interactive/local_interactive.ipynb\n",
145+
"ray.init(address=ray_cluster_uri, runtime_env=runtime_env)\n",
144146
"\n",
145147
"print(\"Ray cluster is up and running: \", ray.is_initialized())"
146148
]

demo-notebooks/guided-demos/4_gpt.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
" min_memory=8,\n",
4545
" max_memory=8,\n",
4646
" num_gpus=1,\n",
47-
" instascale=True,\n",
47+
" instascale=True, #<---instascale enabled\n",
4848
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"],\n",
4949
"))"
5050
]

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ spec:
7373
valueFrom:
7474
fieldRef:
7575
fieldPath: status.podIP
76-
image: ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103
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
7785
imagePullPolicy: Always
7886
lifecycle:
7987
preStop:
@@ -99,7 +107,8 @@ spec:
99107
cpu: 2
100108
memory: 8G
101109
nvidia.com/gpu: 0
102-
rayVersion: 1.12.0
110+
imagePullSecrets: []
111+
rayVersion: 2.1.0
103112
workerGroupSpecs:
104113
- groupName: small-group-gptfttest
105114
maxReplicas: 2
@@ -130,7 +139,15 @@ spec:
130139
valueFrom:
131140
fieldRef:
132141
fieldPath: status.podIP
133-
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
134151
lifecycle:
135152
preStop:
136153
exec:
@@ -148,6 +165,7 @@ spec:
148165
cpu: 2
149166
memory: 8G
150167
nvidia.com/gpu: 1
168+
imagePullSecrets: []
151169
initContainers:
152170
- command:
153171
- sh

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ spec:
7373
valueFrom:
7474
fieldRef:
7575
fieldPath: status.podIP
76-
image: ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103
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
7785
imagePullPolicy: Always
7886
lifecycle:
7987
preStop:
@@ -99,7 +107,8 @@ spec:
99107
cpu: 2
100108
memory: 8G
101109
nvidia.com/gpu: 0
102-
rayVersion: 1.12.0
110+
imagePullSecrets: []
111+
rayVersion: 2.1.0
103112
workerGroupSpecs:
104113
- groupName: small-group-interactivetest
105114
maxReplicas: 2
@@ -130,7 +139,15 @@ spec:
130139
valueFrom:
131140
fieldRef:
132141
fieldPath: status.podIP
133-
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
134151
lifecycle:
135152
preStop:
136153
exec:
@@ -148,6 +165,7 @@ spec:
148165
cpu: 2
149166
memory: 8G
150167
nvidia.com/gpu: 1
168+
imagePullSecrets: []
151169
initContainers:
152170
- command:
153171
- sh

demo-notebooks/guided-demos/preview_nbs/3_basic_interactive.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
" min_memory=8,\n",
6262
" max_memory=8,\n",
6363
" num_gpus=1,\n",
64-
" instascale=True,\n",
64+
" instascale=True, #<---instascale enabled\n",
6565
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"]\n",
6666
" \n",
6767
"))"
@@ -140,7 +140,9 @@
140140
"#install additional libraries that will be required for model training\n",
141141
"runtime_env = {\"pip\": [\"transformers\", \"datasets\", \"evaluate\", \"pyarrow<7.0.0\", \"accelerate\"]}\n",
142142
"\n",
143-
"ray.init(address=f'{ray_cluster_uri}', runtime_env=runtime_env)\n",
143+
"# NOTE: This will work for in-cluster notebook servers (RHODS/ODH), but not for local machines\n",
144+
"# To see how to connect from your laptop, go to demo-notebooks/additional-interactive/local_interactive.ipynb\n",
145+
"ray.init(address=ray_cluster_uri, runtime_env=runtime_env)\n",
144146
"\n",
145147
"print(\"Ray cluster is up and running: \", ray.is_initialized())"
146148
]

demo-notebooks/guided-demos/preview_nbs/4_gpt.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
" min_memory=8,\n",
4545
" max_memory=8,\n",
4646
" num_gpus=1,\n",
47-
" instascale=True,\n",
47+
" instascale=True, #<---instascale enabled\n",
4848
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"],\n",
4949
"))"
5050
]

0 commit comments

Comments
 (0)