The Dev Server needs to be set up for data parsing and report generation. NVLeak scripts use MongoDB to store the parsed data, and then fetch the useful data from MongoDB to generate plots.
The dev server requires the following system and software:
- OS: Any Linux-based distro
- Python:
3.8+
(We use3.10.8
)- Python packages: see the end of this doc
- Docker and docker-compose: any recent version (We use
Docker version 20.10.21, build baeda1f82a
)
You may use the Docker compose file to set up the MongoDB:
-
Install the Docker and
docker-compose
on your Dev Server -
Update the Docker compose file
NVLeak/docker/MongoDB.yml
with your username, password, and data storage path for the MongoDB -
Boot up the MongoDB by:
$ cd NVLeak/docker $ bash up.sh Recreating docker_mongo_1 ... done Recreating docker_mongo-express_1 ... done
-
(Optional) If you'd like to browse the MongoDB for maintenance or updates, you may try JetBrains DataGrip or other GUI tools.
-
Set up MongoDB connection for Python scripts, choose one approach from below:
-
Set shell environment variable
MONGODB_USERNAME
andMONGODB_PASSWORD
, so thatNVLeak/scripts/parse/radar/utils.py
can read them$ export MONGODB_USERNAME=*** $ export MONGODB_PASSWORD=***
-
Update the parser script
NVLeak/scripts/parse/radar/utils.py
with MongoDB connection info (username, password, URL, and port).
-
-
Install the following python packages
$ pip3 install click editdistance numpyencoder pandas pymongo numpy