-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
89 lines (72 loc) · 1.99 KB
/
Dockerfile
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
FROM tensorflow/tensorflow:1.4.0-gpu
LABEL maintainer="Marc Rußwurm <marc.russwurm@tum.de>"
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
python-tk
## Python Packages
# psycopg2 \
# configobj \
RUN pip --no-cache-dir install \
matplotlib \
jupyter \
pandas \
numpy \
configparser \
shapely \
geopandas
## Install GDAL for evaluate.py -> adapted from https://hub.docker.com/r/ecarrara/python-gdal/~/dockerfile/
ENV GDAL_VERSION=2.2.3
ENV GDAL_VERSION_PYTHON=2.2.3
RUN apt-get update && apt-get -y install \
wget \
libcurl4-openssl-dev \
build-essential \
libpq-dev \
ogdi-bin \
libogdi3.2-dev \
libjasper-runtime \
libjasper-dev \
libjasper1 \
libgeos-c1v5 \
libproj-dev \
libpoppler-dev \
libsqlite3-dev \
libspatialite-dev
# python \
# python-pip \
# python-dev \
# python-numpy-dev
RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal-${GDAL_VERSION}.tar.gz && \
tar -x -f /tmp/gdal-${GDAL_VERSION}.tar.gz -C /tmp
RUN cp -r /tmp/gdal-2.2.3/data /usr/local/share/gdal/
ENV GDAL_DATA /usr/local/share/gdal
RUN cd /tmp/gdal-${GDAL_VERSION} && \
./configure \
--prefix=/usr \
--with-python \
--with-geos \
--with-geotiff \
--with-jpeg \
--with-png \
--with-expat \
--with-libkml \
--with-openjpeg \
--with-pg \
--with-curl \
--with-spatialite && \
make && make install
RUN rm /tmp/gdal-${GDAL_VERSION} -rf && rm /tmp/gdal-${GDAL_VERSION}.tar.gz
RUN pip install GDAL==${GDAL_VERSION_PYTHON} \
rasterio
# enable jupyter widgets
RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix
# create directory to mount data
ENV datadir /data
RUN mkdir data
ENV modeldir /model
RUN mkdir /model
ENV modelzoo /MTLCC/modelzoo
RUN mkdir MTLCC
COPY ./ /MTLCC/
WORKDIR "/MTLCC"
CMD ["/bin/bash"]