- Notifications
You must be signed in to change notification settings - Fork0
License
VectorInstitute/FLorist
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A platform to launch federated learning (FL) training jobs.
To install the project dependencies, first you need to create a virtual environment.The easiest way is by using thevirtualenv package:
virtualenv venvsource venv/bin/activate
We usePoetry to manage back-end dependencies:
pip install --upgrade pip poetrypoetry install
We useYarn to manage front-end dependencies. Install it on MacOSusingHomebrew. Also make sure install Node in case you don't have it.
brew install nodebrew install yarn
Then install the project dependencies in production mode:
yarn --prod
Redis is used to fetch the metrics reported by servers and clients during their runs.
If you don't have Docker installed, followthese instructionsto install it. Then, pullRedis' official docker image(we currently use version 7.2.4):
docker pull redis:7.2.4
MongoDB is used to store information about the training jobs.
If you don't have Docker installed, followthese instructionsto install it. Then, pullMongoDB' official docker image(we currently use version 7.0.8):
docker pull mongo:7.0.8
If it's your first time running it, create a container and run it with the command below:
docker run --name mongodb-florist -d -p 27017:27017 mongo:7.0.8
From the second time on, you can just start it:
docker start mongodb-florist
If it's your first time running it, create a container and run it with the command below:
docker run --name redis-florist-server -d -p 6379:6379 redis:7.2.4 redis-server --save 60 1 --loglevel warning
From the second time on, you can just start it:
docker start redis-florist-server
Use Yarn to run both the back-end and front-end on production server mode:
yarn prod
The front-end will be available athttp://localhost:3000
. If you want to accessback-end APIs individually, they will be available athttps://localhost:8000
.
If it's your first time running it, create a container and run it with the command below:
docker run --name redis-florist-client -d -p 6380:6379 redis:7.2.4 redis-server --save 60 1 --loglevel warning
From the second time on, you can just start it:
docker start redis-florist-client
To start the client back-end service:
python -m uvicorn florist.api.client:app --reload --port 8001
The service will be available athttp://localhost:8001
.
If you are interested in contributing to the library, please seeCONTRIBUTING.MD.This file contains many details around contributing to the code base, including developmentpractices, code checks, tests, and more.