-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile22
More file actions
109 lines (83 loc) · 3.82 KB
/
Dockerfile22
File metadata and controls
109 lines (83 loc) · 3.82 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Python Dockerfile
#
# https://github.com/tamboraorg/docker/crepython
#
# Pull base image.
FROM credocker/creubuntu:2022.0
MAINTAINER Michael Kahle <michael.kahle@yahoo.de>
ARG BUILD_YEAR=2022
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
## No module named 'gendoc' -> 22.04 only
## RUN pip3 install --upgrade pip
## RUN pip3 install gendoc
## RUN pip3 install datatable
# plotly==5.9 ??
# https://github.com/cgoldberg/xvfbwrapper
RUN pip3 install seaborn plotly kaleido 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
# rtree==0.9.4 & geopandas==0.9 & xlrd==1.2 & openpyxl==3.0 ??
RUN apt-get -y --no-install-recommends install libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN C_INCLUDE_PATH=/usr/include/gdal
RUN echo $(gdal-config --version)
RUN pip3 install gdal==3.4.1
RUN pip3 install scipy rtree geopandas==0.9 fiona patsy statsmodels xlrd openpyxl geocoder geopy
# beautifulsoup4==4.9 ??
RUN pip3 install connexion beautifulsoup4
#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
#may change later to own package:
RUN pip3 install deep-translator
RUN pip3 install newspaper4k
## 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]"
# creTools
# https://github.com/SnakeOilBottles
#RUN pip3 install CreGeoReference==2022.*
RUN pip3 install CreGeoReference
#RUN pip3 install CreLanguageTranslate==2022.*
# 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"]