-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile20
More file actions
82 lines (63 loc) · 3.15 KB
/
Dockerfile20
File metadata and controls
82 lines (63 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Python Dockerfile
#
# https://github.com/tamboraorg/docker/crepython
#
# Pull base image.
FROM credocker/creubuntu:2020.0
MAINTAINER Michael Kahle <michael.kahle@yahoo.de>
ARG BUILD_YEAR=2020
ARG BUILD_MONTH=0
ARG BUILD_TAG=latest
# version: yyyy.n for stable versions / 0.yyyy for development
LABEL Name="Python for CRE" \
CRE=$CRE_VERSION \
Year=$BUILD_YEAR \
Month=$BUILD_MONTH \
Version=$PYTHON_VERSION \
OS="Ubuntu:$UBUNTU_VERSION" \
Build_=$BUILD_TAG
# install libspatial
RUN apt-get update && apt-get -y --no-install-recommends install libspatialindex-dev && apt-get clean
# install Python
RUN apt-get update && apt-get -y --no-install-recommends install python3-dev python3-plotly && apt-get clean
RUN apt-get -y --no-install-recommends install python3-scipy python3-h5py
##RUN pip3 install --upgrade pip
RUN pip3 install setuptools wheel psutil pipreqs arrow
# https://github.com/cgoldberg/xvfbwrapper
RUN pip3 install seaborn plotly==5.9 kaleido==0.2.1 xvfbwrapper
# https://shapely.readthedocs.io/en/2.1.1/manual.html
# https://cartopy.readthedocs.io/stable/
## RUN pip3 install shapely cartopy --no-binary shapely --no-binary cartopy
# PIL: https://pypi.org/project/pillow/
# folium: https://python-visualization.github.io/folium/latest/
RUN pip3 install pillow folium
RUN pip3 install scipy rtree==0.9.4 geopandas==0.6 fiona patsy statsmodels datatable xlrd==1.2 openpyxl==3.0 geopy
RUN pip3 install connexion beautifulsoup4==4.9
#RUN pip3 install pycurl #recommended by jupyterlab
# https://pingouin-stats.org/build/html/index.html
RUN pip3 install pingouin
RUN pip3 install selenium webdriver-manager selenium-requests
## Install new chrome ??
## wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; dpkg -i google-chrome-stable_current_amd64.deb
# OpenCV
RUN apt-get -y --no-install-recommends install python3-opencv
RUN pip3 install opencv-python
#FastAPI: https://fastapi.tiangolo.com
RUN pip3 install "fastapi[standard]"
# Freeze python requirements here:
RUN mkdir -p /cre && \
pip3 freeze --no-cache-dir > /cre/requirements.txt.orig
RUN mkdir -p /cre && touch /cre/versions.txt && \
echo "$(date +'%F %R') \t crePython \t $CRE_VERSION" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t scipy \t $(python3 -c 'import scipy; print(scipy.__version__)')" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t statsmodels \t $(python3 -c 'import statsmodels; print(statsmodels.__version__)')" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t geopandas \t $(python3 -c 'import geopandas; print(geopandas.__version__)')" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t fiona \t $(python3 -c 'import fiona; print(fiona.__version__)')" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t beautifulsoup4 \t $(python3 -c 'import beautifulsoup4; print(beautifulsoup4.__version__)')" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t openCV \t $(python3 -c 'import cv2; print(cv2.__version__)')" >> /cre/versions.txt
COPY cre /cre
WORKDIR /cre/python ## ??
#WORKDIR /cre
#EXPOSE 8000
ENTRYPOINT ["/cre/python-entrypoint.sh"]
CMD ["shoreman", "/cre/python-procfile"]