forked from UDST/urbanaccess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (66 loc) · 2.45 KB
/
Dockerfile
File metadata and controls
77 lines (66 loc) · 2.45 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
FROM python:3.5
RUN mkdir -p /provisioning
WORKDIR /provisioning
# Install build dependencies
RUN apt-get update && \
apt-get -yq install \
build-essential \
gcc \
libgeos-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
# also need libgeos for Shapely, Pandana
RUN echo "Installing Spatial Index library..." && \
mkdir -p /provisioning/spatialindex && \
cd /provisioning/spatialindex && \
curl -# -O http://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar.gz && \
tar -xzf spatialindex-src-1.8.5.tar.gz && \
cd spatialindex-src-1.8.5 && \
./configure --prefix=/usr/local && \
make -j$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())') && \
make install && \
ldconfig && \
rm -rf /provisioning/spatialindex*
RUN echo "Installing GEOS library..." && \
mkdir -p /provisioning/geos && \
cd /provisioning/geos && \
curl -# -O http://download.osgeo.org/geos/geos-3.5.1.tar.bz2 && \
tar -xjf geos-3.5.1.tar.bz2 && \
cd geos-3.5.1 && \
./configure && \
make -j$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())') && \
make install && \
ldconfig -v && \
rm -rf /provisioning/geos*
RUN echo "Installing Proj4 library..." && \
mkdir -p /provisioning/proj4 && \
cd /provisioning/proj4 && \
curl -# -O http://download.osgeo.org/proj/proj-4.9.3.tar.gz && \
tar -xzf proj-4.9.3.tar.gz && \
cd proj-4.9.3 && \
./configure && \
make -j$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())') && \
make install && \
ldconfig -v && \
rm -rf /provisioning/proj4
# basemap (incorrectly) requires numpy to be installed *before* installing it
RUN pip install --upgrade numpy
RUN echo "Installing Basemap plotting library..." && \
mkdir -p /provisioning/matplotlib-basemap && \
cd /provisioning/matplotlib-basemap && \
curl -# -o basemap-1.0.7rel.tar.gz https://codeload.github.com/matplotlib/basemap/tar.gz/v1.0.7rel && \
tar -xzf basemap-1.0.7rel.tar.gz && \
cd basemap-1.0.7rel && \
python setup.py install && \
rm -rf /provisioning/matplotlib-basemap
RUN mkdir -p /code/
WORKDIR /code
COPY . /code
# install this repo's python package
RUN pip install .
# run tests which has added bonus of installing
# test dependencies so they won't have to be installed
# on every single test run
RUN ./test.sh
# install this repo's python package
RUN pip install .