Skip to content

A tool that simplifies training RL agents for cloud resource management by bridging CloudSim Plus with Gymnasium

License

Notifications You must be signed in to change notification settings

tgasla/rl-cloudsimplus

Repository files navigation

Codacy Badge GPLv3 License

Requirements

Linux Debian 12/11/10

1. Install Docker

https://docs.docker.com/get-docker/

2. Install Docker Compose

https://docs.docker.com/compose/install/

3. Install Java 21

You can install OpenJDK 21 JDK and JRE

sudo apt-get install openjdk-21-jdk openjdk-21-jre

4. Set the JAVA_HOME environment variable to the right path (the exact path may vary (different distro, different arch)

export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-<arch>
MacOS 14/13/12/11

1. Install Docker

https://docs.docker.com/get-docker/

⚠️ Warning: If you install Docker Desktop, make sure you are giving enough memory in your containers by going to Settings.. > Resources and increasing the Memory Limit

2. Install Docker Compose

https://docs.docker.com/compose/install/

3. Install Java 21 JDK and JRE

You can install OpenJDK Java 21 using brew

brew install openjdk@21

4. Make sure that the environment variable JAVA_HOME is set to the right path

export JAVA_HOME=/usr/libexec/java_home

Build images

1. Build gateway image

Use the following command to build the gateway image:

make build-gateway

To enable debugging and show DEBUG log messages, use the following command:

make build-gateway-debug

2. Build manager image

To build the manager image, use the following command:

make build-manager

3. Build TensorBoard image

make build-tensorboard

Start application

First start TensorBoard:

make run-tensorboard

Use the following command:

docker compose [--profile cuda] up [--build] [-d | --detach]
  • The --profile cuda flag enables Nvidia CUDA GPU access for the manager. You need to have CUDA and nvidia-container-toolkit installed on your system. Make sure to restart docker daemon if you just downloaded the cuda-container-toolkit.
  • The --build flag also builds the manager image
  • The -d flag runs the app in detached mode (runs in the background)

If, after running the app, you want to start a second manager (to run a second experiment simultaneously), you need to run:

docker compose run [--build] [-d | --detach] manager

Stop application

To stop the application, use the following command:

docker compose down

If you also want to clear docker unused data, use the following command:

docker system prune [-f | --force]

Acknowledgements

This project uses the CloudSim Plus framework: a full-featured, highly extensible, easy-to-use Java 17+ framework for modeling and simulating cloud computing infrastructure and services. The source code is available here.

The code was based on the work done by pkoperek in the following projects: