Setup guide: What parts are needed for federated learning on Raspberry Pi?
Created for Udacity Secure and Privacy AI Challenge
Minimal Raspberry Pi set
Minimal environment set
Remotely access the command line
Resources
Minimal Raspberry Pi set
Raspberry Pi
For the project was the version 4B+ used, but the version 3B can be used.
Power adapter
From the 4th version is a special power adapter needed.
MicroSD
For the Project was MicroSD 32 GB used with pre-installed NOOBS 3.1.0, but it can be 16 GB.
SD-Adapter
The SD-slot and SD-Adapter were used to get access to raspberry Pi console.
It’s also a good idea to buy a Raspberry Pi box to keep it clean. And a fan to keep it cool, because Raspberry Pi 4 tends to get hot.
An example of Raspberry Pi set for the project.
Minimal environment set
Hardware
Laptop or computer with installed PySyft, PyTorch, Python.
Connection to the internet. In the project we will use a router and the Raspberry Pi will be connected with network cable to it.
Software
On the laptop open working jupyter notebook “Federated Recurrent Neural Network”.
At the Raspberry Pi you will need to start run_websocket_server.py with the ip address, port, id.
Finally, all components are displayed together on the following diagram.
Remotely access the command line
To access the command line of a Raspberry Pi remotely in the same network with SSH, you have to activate it.
For the SSH activation take the microSD from Raspberry Pi and place it into SD-reader.
To be able to work with microSD on the mac, you will need an SD-Adapter as in the photo.
To enable SSH on raspberry Pi just place a file named “ssh” on the card.
More details in SSH(Secure Shell).
Resources
Federated learning of a recurrent neural network on Raspberry Pis