-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (34 loc) · 966 Bytes
/
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
FROM ubuntu:latest
USER root
# Set front frontend to noninteractive
ARG DEBIAN_FRONTEND=noninteractive
# LIBPOSTAL
# Install Libpostal dependencies
RUN apt-get update && \
apt-get install -y \
make \
curl \
autoconf \
automake \
libtool \
pkg-config \
python3-pip
# Download libpostal source to /usr/local/libpostal-1.1-alpha
RUN cd /usr/local && curl -sL https://github.com/openvenues/libpostal/archive/v1.1-alpha.tar.gz | tar -xz
# Create Libpostal data directory at /var/libpostal/data
RUN cd /var && \
mkdir libpostal && \
cd libpostal && \
mkdir data
# Install Libpostal from source
RUN cd /usr/local/libpostal-1.1-alpha && \
./bootstrap.sh && \
./configure --datadir=/var/libpostal/data && \
make -j4 && \
make install && \
ldconfig
# Install Libpostal python Bindings
RUN pip3 install postal
# Add and run python script
ADD addressParser.py /
CMD [ "python3", "./addressParser.py" ]