File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
nemo_run/run/ray/templates
test/core/execution/artifacts Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ monitor-sidecar() {
132132}
133133monitor-sidecar &
134134
135+ # Patch nsight.py before starting Ray head
136+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
137+
135138cat <<EOFINNER | tee /launch-head.sh
136139ray start --head \
137140 --disable-usage-stats \
@@ -209,6 +212,9 @@ monitor-sidecar() {
209212}
210213monitor-sidecar &
211214
215+ # Patch nsight.py before starting Ray worker
216+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
217+
212218cat <<EOFINNER | tee /launch-worker.sh
213219sleep 5
214220ray start --address "$ip_head " \
Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ monitor-sidecar() {
126126}
127127monitor-sidecar &
128128
129+ # Patch nsight.py before starting Ray head
130+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
131+
129132cat <<EOFINNER | tee /launch-head.sh
130133ray start --head \
131134 --disable-usage-stats \
@@ -199,6 +202,9 @@ monitor-sidecar() {
199202}
200203monitor-sidecar &
201204
205+ # Patch nsight.py before starting Ray worker
206+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
207+
202208cat <<EOFINNER | tee /launch-worker.sh
203209sleep 5
204210ray start --address "$ip_head " \
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ monitor-sidecar() {
131131}
132132monitor-sidecar &
133133
134+ # Patch nsight.py before starting Ray head
135+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
136+
134137cat <<EOFINNER | tee /launch-head.sh
135138ray start --head \
136139 --disable-usage-stats \
@@ -206,6 +209,9 @@ monitor-sidecar() {
206209}
207210monitor-sidecar &
208211
212+ # Patch nsight.py before starting Ray worker
213+ sed -i 's/context\.py_executable = " "\.join(self\.nsight_cmd) + " python"/context.py_executable = " ".join(self.nsight_cmd) + f" {context.py_executable}"/g' /opt/nemo_rl_venv/lib64/python*/site-packages/ray/_private/runtime_env/nsight.py
214+
209215cat <<EOFINNER | tee /launch-worker.sh
210216sleep 5
211217ray start --address "$ip_head " \
You can’t perform that action at this time.
0 commit comments