Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsb4 authored May 9, 2023
1 parent 9e88210 commit 14b2352
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ The main contributions of this framework:
5) Improve Tensorboard logging by incorporating both training and testing phases.
6) Implement control packets to realistically simulate the communication between the nodes and evaluate the overhead of running a DRL approach.


Installation
============
The PRISMA-v2 installlation can be done using the following methods:

# Downloading and installing locally
I- Local Installation
============

If you don't have the Ns3-gym alrady installed
If you don't have the Nse-gym alrady installed

1. If the submodule was not yet initialized, initialize them.
```
Expand All @@ -39,23 +37,36 @@ sudo sh install.sh

3. Go to my_network directory and install the python packages required using the command below (numpy, networkx, gym, tensorflow, zmq)
```
cd ./my_network/
cd ./prisma/
pip install -e .
```

4. For training, run the script:
4. For training or testing, run the main program with the parameters:
```
./train.sh
python3 main.py $PARAMS
```
II- Using Docker
============
## 1. Build the docker image locally

a) Install docker dependencies

5. For testing the agent, run the script:
b) build the docker image using the docker file
```
./test.sh
docker build -t prisma .
```

6. (Optional) For killing agents, use the script:
c) run the docker image and bind only the examples folder to the container
```
sudo docker run --rm --gpus all -v ./prisma/examples:/app/prisma/examples -w /app/prisma prisma /bin/bash -c "python3 main.py $PARAMS"
```
## 2. Use an existing environment from DockerHub
a) Pull the docker image from dockerhub
```
docker pull allicheredha/prisma_env
```
b) run the docker image and bind the complete folder to the container
```
./kill_agents.sh
sudo docker run --rm --gpus all -v ./prisma/:/prisma -w /prisma allicheredha/prisma_env /bin/bash -c "python3 main.py $PARAMS"
```

Usage guide
Expand Down Expand Up @@ -154,4 +165,4 @@ The training curves are described below. The cost represents the average delay p

In the figure below, we can evaluate the model performance. We can observe that the DQN-Routing agent is capable of learning a ploicy proximal to a Shortest Path algorithm. In some of the scenarios evaluated, it can performs better than the shortest path algorithm.

![My Image](images/testing_curves.png)
![My Image](images/testing_curves.png)

0 comments on commit 14b2352

Please sign in to comment.