#!/bin/bash
FROM tensorflow/tensorflow:2.2.0
#FROM emacski/tensorflow-serving:2.2.0-linux_arm
#FROM raspbian/stretch

RUN apt-get update

RUN apt-get install -y supervisor

RUN apt-get install -y nginx

RUN apt-get install -y python3-dev python3-pip python3-numpy

RUN apt-get install -y libopenjp2-7

RUN apt-get install -y libatlas-base-dev

RUN apt-get clean && apt autoclean && apt autoremove

RUN pip3 install uwsgi

RUN pip3 install Flask==1.1.4

RUN pip3 install Flask-api==1.1

RUN pip3 install Flask-cors

RUN pip3 install Flask-mysql

RUN pip3 install Flask-restful

RUN pip3 install docker

RUN pip3 install influxdb

RUN pip3 install passlib

RUN pip3 install requests

RUN pip3 install line-notify

RUN apt install -y build-essential

RUN pip3 install scikit-build

#RUN pip3 install numpy

RUN pip3 install pandas xlsxwriter

RUN pip3 install pillow

#RUN pip3 install mtcnn

RUN pip3 install matplotlib

#RUN pip3 install flask-socketio

#RUN apt-get install -y libopencv-dev
#RUN apt-get install -y --fix-missing
#RUN apt-get install -y cmake pkg-config libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
#RUN apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
#RUN apt-get update
#RUN apt-get install -y libxvidcore-dev libx264-dev libgtk2.0-dev libatlas-base-dev gfortran

#RUN pip3 install opencv-python

#RUN pip3 install opencv-python-headless

#RUN pip3 install opencv-contrib-python-headless

#RUN apt install -y python3-opencv

RUN pip3 install Flask_APScheduler
RUN pip3 install xlrd
RUN pip3 install python-docx
RUN pip3 install pymysql==0.10.1
RUN pip3 install flask-api


RUN mkdir /log

#RUN pip3 install python-docx

WORKDIR /app

EXPOSE 8000

ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 TZ=Asia/Taipei

CMD ["/usr/bin/supervisord"]
