Epidemics Simulations is a web application that allows you to create and visualize epidemics on networks. The application is built using Svelte for the frontend and Flask as the backend web server.
Ensure you have the following prerequisites installed on your system:
Clone the repository and navigate to the directory
git clone https://github.com/victormhp/epidemics-simulations.git
cd epidemics-simulations.git
# Install and build frontend
cd ./client/
pnpm install
pnpm run build
# Create and activate venv
cd ./server/
python3 -m venv venv
source ./venv/bin/activate
# Install python libraries
pip install -r requirements.txt
Run the flask server for developement
python index.py
Run for production with gunicorn
gunicorn --bind 0.0.0.0:8997 --timeout 600 wsgi:app
For a convenient and containerized deployment, you can use Docker.
Build docker image for the API
docker build -f Dockerfile.api -t eon-api .
Build docker image for the client and the nginx server
docker build -f Dockerfile.client -t eon-client .
Run docker compose to orchestrate the containers
docker compose up
To run the desktop app, it will be built using FlaskWebGui. Please ensure that Google Chrome or Chromium is installed on your system.
python desktop.py
To create an executable for the desktop app, we utilize PyInstaller. You have two options to build the app:
chmod +x desktop.sh
./desktop.sh
Note: In the --add-data argument the path separator is platform specific, os.pathsep (which is ; on Windows and : on most unix systems) is used.
Run the app
./app/dist/epidemics
The simulations are made possible by EoN, a Python package designed for simulating epidemics on networks and solving Ordinary Differential Equation (ODE) models of disease spread.
For more details on using the EoN module, refer to the Epidemics on Networks Documenation. It provides comprehensive information on utilizing the EoN package.