install.sh 1.2 KB

1234567891011121314151617181920
  1. #!/bin/sh
  2. sudo apt-get update
  3. sudo apt-get install python3-pip tesseract-ocr python3-opencv build-essential cmake pkg-config libjpeg-dev libtiff5-dev libjasper-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libfontconfig1-dev libcairo2-dev libgdk-pixbuf2.0-dev libpango1.0-dev libgtk2.0-dev libgtk-3-dev libatlas-base-dev gfortran libhdf5-dev libhdf5-serial-dev libhdf5-103 python3-pyqt5 python3-dev -y
  4. pip3 install -r src/requirements.txt
  5. pip3 install -U numpy
  6. git clone https://github.com/arturaugusto/display_ocr
  7. sudo cp display_ocr/letsgodigital/* /usr/share/tesseract-ocr/4.00/tessdata/
  8. git clone https://github.com/adrianlazaro8/Tesseract_sevenSegmentsLetsGoDigital && cd Tesseract_sevenSegmentsLetsGoDigital
  9. sudo mv 'Trained data'/ /usr/share/tesseract-ocr/4.00/tessdata/
  10. docker-compose up -d
  11. (crontab -l 2>/dev/null; echo "@reboot python3 /home/pi/solar-monitor/src/data-writer.py") | crontab -
  12. # python3 data-writer.py
  13. echo "Reboot pi to complete setup and start the data job or run 'python3 /home/pi/solar-monitor/src/data-writer.py'"
  14. # UNSORTED
  15. # git clone https://github.com/ljk53/pytorch-rpi && cd pytorch-rpi
  16. # LIBTORCH_VARIANT=armv7l-cxx11-abi-shared-without-deps ./build_libtorch.sh