diff --git a/doc/install-on-macosx.md b/doc/install-on-macosx.md index 10c3f80d8..3e9b5234f 100644 --- a/doc/install-on-macosx.md +++ b/doc/install-on-macosx.md @@ -10,7 +10,6 @@ To install Ray, first install the following dependencies. We recommend using ``` brew update brew install cmake automake autoconf libtool boost wget -sudo easy_install pip # If you're using Anaconda, then this is unnecessary. pip install numpy cloudpickle funcsigs colorama psutil redis --ignore-installed six ``` @@ -21,7 +20,7 @@ Ray can be built from the repository as follows. ``` git clone https://github.com/ray-project/ray.git -cd ray/lib/python +cd ray/python python setup.py install --user ``` diff --git a/doc/install-on-ubuntu.md b/doc/install-on-ubuntu.md index 7d46d5c2a..130dc3d68 100644 --- a/doc/install-on-ubuntu.md +++ b/doc/install-on-ubuntu.md @@ -10,7 +10,7 @@ To install Ray, first install the following dependencies. We recommend using ``` sudo apt-get update -sudo apt-get install -y cmake build-essential autoconf curl libtool python-dev python-pip libboost-all-dev unzip # If you're using Anaconda, then python-dev and python-pip are unnecessary. +sudo apt-get install -y cmake build-essential autoconf curl libtool libboost-all-dev unzip python-dev python-pip # If you're using Anaconda, then python-dev and python-pip are unnecessary. pip install numpy cloudpickle funcsigs colorama psutil redis ``` @@ -21,7 +21,7 @@ Ray can be built from the repository as follows. ``` git clone https://github.com/ray-project/ray.git -cd ray/lib/python +cd ray/python python setup.py install --user ``` diff --git a/doc/using-ray-on-a-cluster.md b/doc/using-ray-on-a-cluster.md index 53bceffed..24705f71e 100644 --- a/doc/using-ray-on-a-cluster.md +++ b/doc/using-ray-on-a-cluster.md @@ -27,10 +27,14 @@ should look something like `123.45.67.89:12345`). ``` ./ray/scripts/start_ray.sh --redis-address ``` -To specify the number of processes to start, use the flag `--num-workers`, as follows: + +To specify the number of processes to start, use the flag `--num-workers`, as +follows: + ``` ./ray/scripts/start_ray.sh --num-workers ``` + Now we've started all of the Ray processes on each node Ray. This includes - Some worker processes on each machine. @@ -39,7 +43,8 @@ Now we've started all of the Ray processes on each node Ray. This includes - One Redis server (on the head node). - One global scheduler (on the head node). -To run some commands, start up Python on one of the nodes in the cluster, and do the following. +To run some commands, start up Python on one of the nodes in the cluster, and do +the following. ```python import ray @@ -56,7 +61,7 @@ def f(x): ray.get([f.remote(f.remote(f.remote(0))) for _ in range(1000)]) ``` -### Stopping Ray +### Stopping Ray When you want to stop the Ray processes, run `./ray/scripts/stop_ray.sh` on each node. diff --git a/python/ray/services.py b/python/ray/services.py index 878afea9b..d9ac43aff 100644 --- a/python/ray/services.py +++ b/python/ray/services.py @@ -114,10 +114,7 @@ def cleanup(): successfully_shut_down = successfully_shut_down and success # Reset the list of processes of this type. all_processes[process_type] = [] - if successfully_shut_down: - if len(all_processes) > 0: - print("Successfully shut down Ray.") - else: + if not successfully_shut_down: print("Ray did not shut down properly.") def all_processes_alive(exclude=[]): diff --git a/scripts/stop_ray.sh b/scripts/stop_ray.sh index 0727d3cb2..0191e0283 100755 --- a/scripts/stop_ray.sh +++ b/scripts/stop_ray.sh @@ -1,3 +1,9 @@ #!/usr/bin/env bash -killall redis-server global_scheduler plasma_store plasma_manager photon_scheduler +killall global_scheduler plasma_store plasma_manager photon_scheduler + +# Find the PID of the Redis process and kill it. +kill $(ps aux | grep redis-server | awk '{ print $2 }') 2> /dev/null + +# Find the PIDs of the worker processes and kill them. +kill $(ps aux | grep default_worker.py | awk '{ print $2 }') 2> /dev/null diff --git a/test/runtest.py b/test/runtest.py index d9edcea11..b112d89c5 100644 --- a/test/runtest.py +++ b/test/runtest.py @@ -123,7 +123,7 @@ try: import cloudpickle cloudpickle.dumps(Point) except AttributeError: - cloudpickle_command = "pip install --upgrade git+git://github.com/cloudpipe/cloudpickle.git@0d225a4695f1f65ae1cbb2e0bbc145e10167cce4" + cloudpickle_command = "pip install --upgrade cloudpickle" raise Exception("You have an older version of cloudpickle that is not able to serialize namedtuples. Try running \n\n{}\n\n".format(cloudpickle_command)) class SerializationTest(unittest.TestCase):