Raspberry Pi Cluster

Cluster Tutorial

Hardware Setup

  • Rpi v1 x1
  • Rpi v3 x2

Master Node Setup

sudo raspi-config
# change the hostname to indicate master node
sudo apt update && sudo apt upgrade
sudo apt install vim isc-dhcp-server
touch ssh
touch wpa_supplicant.conf
country=us
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
 scan_ssid=1
 ssid="MyNetworkSSID"
 psk="Pa55w0rd1234"
}

Installing DHCP server software for master node

  1. Edit dhcpd.conf
     PUT comment tag # in front of option domain-name "example.org";
     PUT comment tag # in front of option domain-name-servers ns1.example.org, ns2.example.org;
     REMOVE the comment tag # in the line #authoritative;
  2. subnet 192.168.8.0 netmask 255.255.255.0 {
      range 192.168.8.100 192.168.8.200;
      option broadcast-address 192.168.8.255;
      option routers 192.168.8.1;
      max-lease-time 7200;
      option domain-name "rpi3";
      option domain-name-servers 8.8.8.8, 8.8.4.4;
    }

    Installing packages for clustering

Installing relevant packages for tensor flow

https://magpi.raspberrypi.org/articles/tensorflow-ai-raspberry-pi https://www.raspberrypi.org/documentation/linux/software/python.md

sudo apt install python3-pip libatlas-base-dev
pip3 install tensorflow

Model building

https://www.tensorflow.org/tutorials/customization/custom_training_walkthrough