-
Dependencies
Before running the code, you need to ensure that you have the necessary dependencies installed. These include:
- Python
- Ray
- Make
-
Start Ray cluster
You need to start a Ray cluster to run the code. To start the Ray cluster in head mode, run the following command inside local-cluster directory:
make run-headThis will start the Ray head node with the Ray dashboard enabled.
-
Start Ray workers
After starting the Ray cluster in head mode, you need to start Ray workers. Run the following command inside local-cluster directory to start Ray workers:
make run-worker ADDRESS=<head-node-ip-address>Replace with the IP address of the machine running the Ray head node. You can start as many workers as needed.
-
Run tasks
There are several tasks that can be run, including tasks involving actors and objects. To run a task, use one of the following commands inside local-cluster directory:
make run-task make run-objects make run-actors1 make run-actors2 make run-actors3
-
Dependencies
Before running the code, you need to ensure that you have the necessary dependencies installed. These include:
- Python
- Docker
-
Run docker container
Run the following command inside docker-cluster directory
docker-compose up -
Run tasks
There are several tasks that can be run, including tasks involving actors and objects. To run a task, use one of the following commands inside docker-cluster directory:
python ray-lab-1-task.py python ray-lab-2-objects.py python ray-lab-3-actors-1.py python ray-lab-3-actors-2.py python ray-lab-3-actors-3.py