From 0293d854d1947d2ff3ce32b5d92f85de55c55cf8 Mon Sep 17 00:00:00 2001 From: AlasDiablo <25723276+AlasDiablo@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:07:26 +0100 Subject: [PATCH] chore: add libpostal installation and fix minor element --- services/affiliations-tools/Dockerfile | 28 +++++++++++++++++-- services/affiliations-tools/README.md | 10 +++---- services/affiliations-tools/package.json | 4 +-- services/affiliations-tools/swagger.json | 4 +-- .../affiliations-tools/v1/addresses/parse.ini | 2 +- services/affiliations-tools/v1/expand.ini | 2 +- 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/services/affiliations-tools/Dockerfile b/services/affiliations-tools/Dockerfile index fee356cf..353398a3 100644 --- a/services/affiliations-tools/Dockerfile +++ b/services/affiliations-tools/Dockerfile @@ -1,12 +1,34 @@ FROM cnrsinist/ezs-python-server:py3.9-no16-1.0.6 USER root -# Install all python dependencies -# RUN pip install \ -# unidecode==1.3.7 + +# Install libpostal +ENV LIBPOSTAL_HOME=/usr/share/libpostal + +RUN apt install -y curl autoconf automake libtool pkg-config + +ADD \ + https://codeload.github.com/openvenues/libpostal/zip/refs/heads/master \ + ${LIBPOSTAL_HOME}/libpostal.zip + +WORKDIR ${LIBPOSTAL_HOME} + +RUN unzip libpostal.zip && \ + chmod +x libpostal-master && \ + ch libpostal-master && \ + ./bootstrap.sh && \ + ./configure --datadir=${LIBPOSTAL_HOME} && \ + make -j4 && \ + make install && \ + ldconfig && \ + cd .. && \ + rm -rf libpostal-master && \ + rm libpostal.zip # Install all node dependencies RUN npm install \ + node-gyp \ + @cymen/node-postal@2.0.5 \ @ezs/libpostal@0.2.3 \ @ezs/conditor@2.10.7 diff --git a/services/affiliations-tools/README.md b/services/affiliations-tools/README.md index 1cbcda27..f5b802aa 100644 --- a/services/affiliations-tools/README.md +++ b/services/affiliations-tools/README.md @@ -57,7 +57,7 @@ des virgules. #### Exemple CSV ```bash -cat <