forked from trailbehind/DeepOSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (55 loc) · 2.62 KB
/
Dockerfile
File metadata and controls
65 lines (55 loc) · 2.62 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
# https://hub.docker.com/r/homme/gdal/
FROM geodata/gdal:2.0.0
# geodata/gdal sets the user to noboby, so reset to root
USER root
# Based on https://github.com/GoogleCloudPlatform/python-docker/blob/master/Dockerfile
# Link above installs stuff for Python, virtualenv
# Also kludged in stuff for Osmium and Git
RUN apt-get -q update && \
apt-get install --no-install-recommends -y -q \
libbz2-dev python2.7 python2.7-dev cmake python-pip build-essential git mercurial \
libffi-dev libssl-dev libxml2-dev \
libxslt1-dev libpq-dev libmysqlclient-dev libcurl4-openssl-dev \
libjpeg-dev zlib1g-dev libpng12-dev \
gfortran libblas-dev liblapack-dev libatlas-dev libquadmath0 \
libfreetype6-dev pkg-config swig \
zlib1g-dev libshp-dev libsqlite3-dev \
libgd2-xpm-dev libexpat1-dev libgeos-dev libgeos++-dev libxml2-dev \
libsparsehash-dev libv8-dev libicu-dev libgdal1-dev \
libprotobuf-dev protobuf-compiler devscripts debhelper \
fakeroot doxygen libboost-dev libboost-all-dev git-core \
&& \
apt-get clean
# copy requirements.txt and run pip to install all dependencies into the virtualenv.
ADD requirements_base.txt /DeepOSM/requirements_base.txt
ADD requirements_cpu.txt /DeepOSM/requirements_cpu.txt
# fix an issue with the Travis build
RUN pip install --upgrade pip
# ignore-installed is needed to overwrite six
RUN pip install --ignore-installed -r /DeepOSM/requirements_cpu.txt
RUN ln -s /home/vmagent/src /DeepOSM
# install libosmium and pyosmium bindings
RUN git clone https://github.com/osmcode/libosmium /libosmium
RUN cd /libosmium && mkdir build && cd build && cmake .. && make
RUN git clone https://github.com/osmcode/pyosmium.git /pyosmium
RUN cd /pyosmium && pwd && python setup.py install
# update PYTHONPATH
ENV PYTHONPATH /DeepOSM:/DeepOSM/src:$PYTHONPATH
ENV GEO_DATA_DIR /DeepOSM/data
# Jupyter has issues with being run directly:
# https://github.com/ipython/ipython/issues/7062
# We just add a little wrapper script, and set up our jupyter config.
COPY run_jupyter.sh /
COPY jupyter_notebook_config.py /root/.jupyter/
EXPOSE 8888
# install s3cmd, used to ls the RequesterPays bucket
RUN apt-get update && apt-get --no-install-recommends -y -q install wget
RUN wget http://netix.dl.sourceforge.net/project/s3tools/s3cmd/1.6.0/s3cmd-1.6.0.tar.gz && tar xvfz s3cmd-1.6.0.tar.gz && cd s3cmd-1.6.0 && python setup.py install
# copy s3cmd config defaults to docker, which will later be
# updated with AWS credentials by Python inside docker
COPY s3config-default /root/.s3cfg
# https://github.com/tflearn/tflearn/issues/55
# its different if we do AWS GPUs
RUN apt-get install libhdf5-dev
ADD . /DeepOSM
WORKDIR /DeepOSM