mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 14:48:55 +08:00
Kill jupyter in ray stop. (#689)
* Kill jupyter in ray stop. * Terminate jupyter notebook in ray stop. * Fix linting.
This commit is contained in:
committed by
Philipp Moritz
parent
5bb07cb01b
commit
2d636d9278
@@ -159,19 +159,24 @@ def stop():
|
||||
"local_scheduler"], shell=True)
|
||||
|
||||
# Find the PID of the monitor process and kill it.
|
||||
subprocess.call(["kill $(ps aux | grep monitor.py | awk '{ print $2 }') "
|
||||
"2> /dev/null"], shell=True)
|
||||
|
||||
# Find the PID of the Redis process and kill it.
|
||||
subprocess.call(["kill $(ps aux | grep redis-server | awk '{ print $2 }') "
|
||||
"2> /dev/null"], shell=True)
|
||||
|
||||
# Find the PIDs of the worker processes and kill them.
|
||||
subprocess.call(["kill $(ps aux | grep default_worker.py | "
|
||||
subprocess.call(["kill $(ps aux | grep monitor.py | grep -v grep | "
|
||||
"awk '{ print $2 }') 2> /dev/null"], shell=True)
|
||||
|
||||
# Find the PID of the Redis process and kill it.
|
||||
subprocess.call(["kill $(ps aux | grep redis-server | grep -v grep | "
|
||||
"awk '{ print $2 }') 2> /dev/null"], shell=True)
|
||||
|
||||
# Find the PIDs of the worker processes and kill them.
|
||||
subprocess.call(["kill -9 $(ps aux | grep default_worker.py | "
|
||||
"grep -v grep | awk '{ print $2 }') 2> /dev/null"],
|
||||
shell=True)
|
||||
|
||||
# Find the PID of the Ray log monitor process and kill it.
|
||||
subprocess.call(["kill $(ps aux | grep log_monitor.py | "
|
||||
subprocess.call(["kill $(ps aux | grep log_monitor.py | grep -v grep | "
|
||||
"awk '{ print $2 }') 2> /dev/null"], shell=True)
|
||||
|
||||
# Find the PID of the jupyter process and kill it.
|
||||
subprocess.call(["kill $(ps aux | grep jupyter | grep -v grep | "
|
||||
"awk '{ print $2 }') 2> /dev/null"], shell=True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user