For special assignment course, 5 credits. Aalto University, Espoo, Finland.
This architecture is influenced by these articles:
- https://nats.io/blog/how-clarifai-uses-nats-and-kubernetes-for-machine-learning/
- https://dzone.com/articles/real-time-high-performance-machine-learning-using
- Raspberry Pi 3 Model B (2 items)
- Intel fog reference design (1 item)
- Information about k3s: https://k3s.io/
- Useful tutorial: https://blog.alexellis.io/test-drive-k3s-on-raspberry-pi/
- Disable swap memory on all devices in the cluster.
- Set static IPs for all devices in the cluster to make life easier.
- In this experiment, one of the Raspberry Pi is the kubernetes master and the rest of the devices in the cluster are workers.
- On the master, install k3s using the command:
curl -sfL https://get.k3s.io | sh -
- After installing on the master, we need to know the "token" from the master so that other nodes can join the k3s cluster. To print the token, on the master, run this:
cat /var/lib/rancher/k3s/server/node-token
- I don't know if it's a good idea to install the k3s with the same way as the way we install it on the master. On the node, I downloaded k3s from here https://github.com/rancher/k3s/releases and place it in /usr/local/bin
- The worker can join the cluster by issuing:
sudo -E k3s agent -s ${MASTER_IP} -t ${NODE_TOKEN}
- In the master, make sure the workers have joined the cluster by issuing:
k3s kubectl get node -o wide
The docker images must run on multiple CPU architecture, since the aim of this project is to deploy it on kubernets consisting of heterogeneous devices.
The instructions on how to build docker images with multiarch support can be found here: https://lobradov.github.io/Building-docker-multiarch-images/
note: The source code on the Lobradov's tutorial seems to be broken, so I forked and changed a little: https://github.com/adikabintang/docker-multiarch-builder
Why YOLOv3? Why not SSD?
Hence choose SSDs on good microprocessors, else YOLO is the goto for microprocessor-based computations.