FROM julianassmann/opencv-cuda:cuda-10.2-opencv-4.3

RUN apt update

RUN apt install -y supervisor

RUN apt install -y nginx

RUN apt install -y python3-dev python3-pip

RUN apt clean && apt autoclean && apt autoremove

RUN pip3 install uwsgi

RUN pip3 install flask

RUN pip3 install flask-api

RUN pip3 install flask-cors

RUN pip3 install flask-mysql

RUN pip3 install flask-restful

RUN pip3 install flask-restful-swagger-2

RUN pip3 install flask_sqlalchemy

RUN pip3 install passlib

RUN pip3 install requests

RUN pip3 install pandas xlsxwriter

RUN pip3 install pillow

# RUN pip3 install opencv-python-headless

# RUN pip3 install opencv-contrib-python-headless

RUN pip3 install jupyter

# 修正jupyter hight light無法顯示錯誤
RUN pip3 install jedi==0.17.2

RUN pip3 install matplotlib

RUN pip3 install flask-socketio

RUN pip3 install Flask-APScheduler

RUN pip3 install python-docx

RUN pip3 install xlrd

RUN mkdir /log

WORKDIR /app

EXPOSE 8000

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

CMD ["jupyter", "notebook", "--allow-root", "--ip=0.0.0.0"]

# CMD ["/usr/bin/supervisord"]
