-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.preprocessor
37 lines (30 loc) · 1.25 KB
/
Dockerfile.preprocessor
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
FROM debian:buster
# python logging in containers
ENV PYTHONUNBUFFERED=non-empty-string
ENV PYTHONIOENCODING=utf-8
ENV PYTHONHASHSEED=random
# install requirements for osmium and rtree
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
git \
build-essential libboost-python-dev \
osmosis \
libexpat1-dev zlib1g-dev libbz2-dev libspatialindex-dev wget \
locales \
&& rm -rf /var/lib/apt/lists/*
# set locale to UTF-8 (for file encodings)
# from https://stackoverflow.com/questions/28405902/how-to-set-the-locale-inside-a-docker-container
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
# install pip3
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && pip3 install --upgrade wheel setuptools virtualenv
# install plaza_preprocessing
COPY plaza_preprocessing/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
COPY plaza_preprocessing /opt/plaza_preprocessing
WORKDIR /opt/
RUN pip install plaza_preprocessing/
WORKDIR /opt/plaza_preprocessing
CMD ["python3", "scheduled.py"]