- Tested on Raspberry-Pi 4 Model B 2GB RAM
- Docker Version:
19.03.8 - Docker-Compose version:
1.25.5
.| # Based on the example from https://www.activestate.com/blog/dash-vs-bokeh/ | |
| import dash | |
| import dash_core_components as dcc | |
| import dash_html_components as html | |
| import pandas as pd | |
| import plotly.graph_objs as obj | |
| import uvicorn as uvicorn | |
| from dash.dependencies import Input, Output | |
| from fastapi import FastAPI | |
| from starlette.middleware.wsgi import WSGIMiddleware |
| version: "3.6" | |
| services: | |
| db: | |
| image: mariadb:10.3.8 | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '1' | |
| memory: 1G | |
| environment: |
| version: '3.7' | |
| services: | |
| traefik_v2.0: | |
| image: 'traefik:2.2' | |
| container_name: traefik_v2 | |
| hostname: traefik_v2 | |
| ports: | |
| - '443:443' | |
| - '80:80' | |
| - '8080:8080' |
Overview:
Assuming Fedora 23.
| #Script to install Opencv 3.4.4 with optmizations for raspberry pi that can increase performance up to 50%! | |
| #install pre-requisites | |
| sudo apt-get install build-essential checkinstall cmake pkg-config yasm git gfortran libjpeg-dev libjasper-dev libpng-dev libtiff5-dev libtiff-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev libv4l-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk2.0-dev libtbb-dev qt5-default libatlas-base-dev libmp3lame-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libopencore-amrnb-dev libopencore-amrwb-dev libavresample-dev x264 v4l-utils libprotobuf-dev protobuf-compiler libgoogle-glog-dev libgflags-dev libgphoto2-dev libeigen3-dev libhdf5-dev doxygen | |
| #add symlink for libv4l | |
| sudo ln -s -f /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h | |
| #download and install Intel TBB precompiled for raspberry pi 2/3 b | |
| git clone https://github.com/abhiTronix/TBB_Raspberry_pi.git | |
| cd TBB_Raspberry_pi/ |
Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install| from flask import Flask, request, jsonify, json, abort | |
| from flask_cors import CORS, cross_origin | |
| import pandas as pd | |
| app = Flask(__name__) | |
| cors = CORS(app) | |
| app.config['CORS_HEADERS'] = 'Content-Type' |