-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 968 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 968 Bytes
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
FROM python:3.9-slim-buster
WORKDIR /code
ARG OAUTH_TOKEN
ARG URL_PATH
RUN apt-get update \
&& apt-get install -y --no-install-recommends git build-essential gcc autoconf automake libtool python-dev pkg-config curl \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/openvenues/libpostal \
&& cd libpostal \
&& ./bootstrap.sh \
&& mkdir datadir \
&& ./configure --datadir=/datadir \
&& make \
&& make install \
&& ldconfig \
&& export LD_LIBRARY_PATH=/usr/local/lib
RUN git clone https://${OAUTH_TOKEN}:x-oauth-basic@github.com/${URL_PATH} \
&& cd graph-location \
&& pip install --no-cache-dir -r requirements.txt \
&& python setup.py install_docker
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app
CMD ["uvicorn","--app-dir=app", "main:app", "--host", "0.0.0.0", "--port", "8000"]