CI/CD | Python | Federated ML |
---|---|---|
* Docker | Python (3.5-3.6.9) | * Tensorflow |
For using both server and client side in development run both concurrently (in different terminals).
In order to access code for the iOS or Android, please switch to 'iOS' or 'android_branch' branch.
Worklfow is the same for windows and unix
- Install node.js
- Install 'nodemon' globally. It is package enabling live-reload of the client server.
npm install -g nodemon
- Install all node dependencies
cd client npm install
cd client
npm start
Create virtual environment and install dependencies.
Install Docker on your machine
python3 -m venv flaskenv
source flaskenv/bin/activate
pip install -r requirements.txt
Run .\initFlask.ps1
or:
py -3 -m venv flaskenv
flaskenv\Scripts\activate
python -m pip install --upgrade pip
pip install -r requirements.txt
Make sure that you have the '.env' file in the project root directory with all the entries filled with values. In order to run the project for local development, please switch to the 'develop' branch.
docker-compose up
source flaskenv/bin/activate
export FLASK_APP=app.py
export FLASK_ENV=development
flask run
Run .\runApp.ps1
or:
docker-compose up
flaskenv\Scripts\activate
$env:FLASK_APP = "app.py"
$env:FLASK_ENV = "development"
flask run
Once you finish working on the project, run docker-compose down
to stop the Docker container with local database.
Training of local models is currently disabled due to the amount of time it takes t re-train model for all of the postcode areas (around an hour for 253 postcode areas currently in the database). If you want to enable local training - uncomment the following line in flush_and_retrain() method in app.py file:
# cron_scripts.train_locals()
Username: admin
Password: admin
In order to get the test coverage report, execute the following command from the project root:
coverage run --omit 'flaskenv/*' -m unittest project_tests.py && coverage html
It will execute all of the tests and generate a coverage report in HTML format in 'htmlcov' folder.
- Make sure you have run
docker-compose up
to run MySQL server - In Python interactive console execute:
from app import db db.create_all()
Download cudart64_101.dll
(or another version e.g. cudart64_102.dll
) and put it in the appopriate folder and reinstall flaskenv.
- Download Link : https://www.dll-files.com/download/1d7955354884a9058e89bb8ea34415c9/cudart64_101.dll.html?c=N09pWDBSTVYxRE1rM2hpNjVUa2doQT09
- Directory : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\
- Reinstall flaskenv.
Marta Smigielska, Davinder Bassan, Najat Baqadir, Sam Xu, Yiren Zhang, Roman Matios, Wojciech Golaszewski
iOS | Android | Backend |
---|---|---|
Davinder Bassan | Sam Xu | Marta Smigielska |
Najat Baqadir | Yiren Zhang | Wojciech Golaszewski |
Roman Matios |
./