Skip to content

Latest commit

 

History

History
64 lines (56 loc) · 2.1 KB

File metadata and controls

64 lines (56 loc) · 2.1 KB

⚙️ Installation Options

🎴 Burn the Bitbot image to a new SD card

Simple installation that anyone can complete

  1. download the latest release from releases page
  2. use Balena Etcher to burn the zipped image to your SD card.
  3. insert SD, power up and wait for the screen to refresh

💽 Add to an existing PiOS install

🖨️ Enable Hardware interfaces

The inky needs i2c/spi, add these to boot device tree and enable

# add spi device overlay to config.txt
sudo sed -i '/dtoverlay=/d' /boot/firmware/config.txt
sudo bash -c 'echo "dtoverlay=spi0-0cs" > /boot/firmware/config.txt'
# reboot
sudo reboot now
# Ensure that `I2C`/`SPI` are enabled on the host pi
sudo raspi-config nonint do_spi 0
sudo raspi-config nonint do_i2c 0

🐳 A. Run in docker

Requires hardware interfaces to be enabled on the host

# install docker
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $USER
# run the container
docker run --privileged --restart unless-stopped -d ghcr.io/donbing/bitbot:release

💾 B. Python venv

Setup OS, git clone and start venv with python requirements

# make sure python, pip, git and other dependancies are installed
sudo apt update -y
sudo apt install -y git python3-pip python3-rpi.gpio libatlas-base-dev libopenjp2-7 libtiff6 libxcb1 libfreetype6-dev libopenblas-dev
python -m pip install --upgrade pip
# clone this repo 
git clone https://github.com/donbing/bitbot
cd bitbot 
# start venv and install requirements
python -m venv venv
source venv/bin/activate
pip3 install -v --prefer-binary --extra-index-url https://www.piwheels.org/simple -r requirements.txt

Test the app

python3 -m run

Add cron jobs to start the app and config-server after reboot

(crontab -l 2>/dev/null; echo "@reboot sleep 30 && cd /home/pi/bitbot && python3 run.py") | crontab -
(crontab -l 2>/dev/null; echo "@reboot sleep 30 && cd /home/pi/bitbot && python3 src/config_webserver.py") | crontab -