- To run the miniAPI and make it fully operational, we first need to install some OS-level dependencies:
sudo apt update
# Install dependencies - iperf3, ss, ping, netstat, and nmap
sudo apt install iperf3 iproute2 iputils-ping net-tools nmap -y
- Then, clone the repository:
cd ~
git clone https://github.com/5gasp/NetworkAppControl-MiniAPI.git
cd ~/NetworkAppControl-MiniAPI/
- Now, you need to install the miniAPI requirements. This can be done on the host or using a virtual environment. The following commands may be used to install the miniAPI requirements in an Ubuntu 22.04. If you use a different OS, you may need to follow an alternative approach.
- On host:
sudo apt install python3-pip -y
pip3 install --upgrade pip
pip3 install -r requirements.txt
- Using venv:
sudo apt install python3.10-venv -y # Depending on your Ubuntu version, you may have to update this command
cd ~/NetworkAppControl-MiniAPI/
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- Finally, run the miniAPI:
cd ~/NetworkAppControl-MiniAPI/src
python3 -m uvicorn main:app --host=0.0.0.0 --port=3001
-
Docker must be installed on the OS. You can find the official tutorial on how to install Docker here.
-
Run:
cd ~/NetworkAppControl-MiniAPI/
docker compose up