Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

VectorInstitute/FLorist

Repository files navigation

FLorist logo FLorist

A platform to launch federated learning (FL) training jobs.

Setting up

Install dependencies

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

Install Yarn

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

Pulling Redis' Docker

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

Pulling MongoDB's Docker

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

Running the server

Start MongoDB's instance

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

Start server's Redis instance

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

Start back-end and front-end servers

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.

Running the client

Start client's Redis instance

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

Start back-end and front-end servers

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.

Contributing

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.


[8]ページ先頭

©2009-2025 Movatter.jp