Giter Club home page Giter Club logo

federated-learning-system's Introduction

federated-learning-system

Federated learning system using docker and tensorflow.

Running

If you have docker-compose installed you can start a federated learning process by doing these commands. Create two terminal windows and have one of them run as the federation and the other for the devices.

1. Starting the federated server

cd federated-learning-system/federation

sudo docker-compose up

2. Starting the devices

Open the Dockerfile at the device folder in the repository, and edit the ip-adress to the ip-adress the federated server will run at. For example your docker-running device network adress.

at this row "CMD [ "/app/app.py" , "192.168.1.105"]" - Change the ip-adress to your own

cd federated-learning-system/device

sudo docker-compose up

3. Start the learning process

Now the devices should be up and running and both the federated server and devices are stuck in the connected/ready face, so we need to give the federation a starting signal.

curl http://*ipadress*:5001/start-fed

federated-learning-system's People

Contributors

robert-carlsson-kivra avatar robertcarlsson avatar

Stargazers

 avatar  avatar  avatar  avatar

federated-learning-system's Issues

federation: module 'tensorflow' has no attribute 'get_default_graph'

cd ./federated-learning-system/federation
sudo docker-compose up
Recreating fed-srv ... done
Attaching to fed-srv
fed-srv    | 2022-02-20 06:05:58.263345: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
fed-srv    | 2022-02-20 06:05:58.263389: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
fed-srv    | 2022-02-20 06:05:58.263393: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
fed-srv    | Traceback (most recent call last):
fed-srv    |   File "/app/app.py", line 10, in <module>
fed-srv    |     from federation import Federation
fed-srv    |   File "/app/federation.py", line 12, in <module>
fed-srv    |     graph = tf.get_default_graph()
fed-srv    | AttributeError: module 'tensorflow' has no attribute 'get_default_graph'
fed-srv exited with code 1

server: python-dev missing, unsatisfiable constraints

jin@msi:~/Projects/federated-learning-system/server[master]$ sudo docker-compose up
 
Building master
Step 1/9 : FROM python:3.5-alpine
 ---> 6d034ccc54a2
Step 2/9 : RUN apk add docker
 ---> Using cache
 ---> d1902f978a9f
Step 3/9 : RUN apk add     python-dev     libffi-dev     openssl-dev     gcc     libc-dev     make
 ---> Running in 77eda9a7f279
ERROR: unsatisfiable constraints:
  python-dev (missing):
    required by: world[python-dev]
ERROR: Service 'master' failed to build : The command '/bin/sh -c apk add     python-dev     libffi-dev     openssl-dev     gcc     libc-dev     make' returned a non-zero code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.