Newer
Older
# Raspberry Pi Setup
### This ansible Playbook does the following things:
- Install pip3
- Install jupyter-lab
- Setup a systemd service for jupyter-lab, enable it (autostart) and start it
- Jupyter-lab is served on `0.0.0.0:8888` with an empty password. This of course has security implications and should be discussed
- Install the following python3 packages:
- numpy
- seaborn
- plotly
- All python packages are installed into a virtual environment at `~/.ml-venv`. This also includes jupyter-lab which allows for using the default python3 kernel and still having access to all dependencies
### The project is structured as follows:
- [local.yml](./local.yml): The main playbook file, can be seen as the entry point
- [roles](./roles): Contains multiple roles (can be seen as small task specific playbooks). The
roles are called in the [local.yml](./local.yml)
- [jupyter-lab](./roles/jupyter-lab/tasks/main.yml): Install jupyter-lab and configure it with a systemd service and autostart
- [misc-applications](./roles/misc-applications/tasks/main.yml): Install additional extra applications
- [ml-python-packages](./roles/ml-python-packages/tasks/main.yml): Install the machine learning python packages
# Using the ansible playbook on Raspberry Pi OS
Steps to run the ansible script on a fresh (or not fresh) installation of raspberry pi os:
```sh
# Update the APT repo sources
sudo apt update
# Install ansible and git. git is already present on the desktop os version
sudo apt install -y --no-install-recommends ansible git
# Pull and run the ansible scripts from git
ansible-pull -U https://code.fbi.h-da.de/pse-ai-at-the-edge/raspberry-pi-setup.git
## Raspberry Pi OS Version and Architecture
This current version of the playbook will install a prebuilt `tensorflow-2.7` wheel that only works on `Python3.9` and the `Aarch64` architecture.
That means for now the playbook **only works on Raspberry Pi OS 11 64-bit**
### Updating the playbook for 32-bit Raspberry Pi OS
Besides `tensorflow` all other dependencies will pretty much work regardless of architecture and python3 version. So to make this playbook work on 32-bit a decision must be made depending on the architecture. On 32-bit a different prebuilt `tensorflow` wheel must be used, as well as another `numpy` version.