Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 4.0.0
UPDATED :
- (breaking) upgrade OSRM to 6.0.0
- upgrade Valhalla to 3.6.1, using main repo instead of custom one
- lighter and faster docker image build

## 3.1.5
FIXED :
- database manager does not raie error when retries have failed
Expand All @@ -18,7 +24,7 @@ CHANGED:

## 3.1.0
ADDED:
- fields vla_par_defaut, cout_penalites, vehicule_leger_interdit, cout_vehicule_prioritaire
- fields vla_par_defaut, cout_penalites, vehicule_leger_interdit, cout_vehicule_prioritaire

## 3.0.0
REMOVED:
Expand Down
90 changes: 32 additions & 58 deletions docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,67 +1,41 @@
FROM python:3.10.9-slim-bullseye as build

### Installation des dépendances
RUN apt update && apt install -y wget git g++ cmake libboost-dev libboost-filesystem-dev libboost-thread-dev \
libboost-system-dev libboost-regex-dev libxml2-dev libsparsehash-dev libbz2-dev \
zlib1g-dev libzip-dev libgomp1 liblua5.3-dev \
pkg-config libgdal-dev libboost-program-options-dev libboost-iostreams-dev \
libboost-test-dev libtbb-dev libexpat1-dev

### Installation d'OSRM
WORKDIR /home/osrm/
RUN wget https://github.com/Project-OSRM/osrm-backend/archive/v5.26.0.tar.gz && tar -xzf v5.26.0.tar.gz && cd osrm-backend-5.26.0 && \
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . && cmake --build . --target package

### Installation de Valhalla
### Dépendances
RUN apt-get update && \
apt-get install -y cmake make libtool pkg-config g++ gcc curl unzip jq lcov protobuf-compiler \
vim-common locales libcurl4-openssl-dev zlib1g-dev liblz4-dev libprotobuf-dev && \
apt-get install -y libgeos-dev libgeos++-dev libluajit-5.1-dev libspatialite-dev libsqlite3-dev wget sqlite3 spatialite-bin python3-shapely && \
apt-get install -y libsqlite3-mod-spatialite

WORKDIR /home/prime-server
RUN apt-get install -y git cmake autoconf automake pkg-config libtool make gcc g++ lcov libcurl4-openssl-dev libzmq3-dev libczmq-dev
RUN git clone --depth 1 --recursive https://github.com/kevinkreiser/prime_server.git && cd prime_server && \
cmake -B build . && cmake --build build && make -C build install

WORKDIR /home/valhalla/
RUN pip install --upgrade "conan<2.0.0"
RUN git clone --branch 3.2.0-with_hard_exclude --depth 1 --recursive https://github.com/IGNF/valhalla.git && cd valhalla && \
mkdir build && cmake -B build -DCMAKE_BUILD_TYPE=Release && make -C build && make -C build package

FROM python:3.10.9-slim-bullseye as r2gg

ENV PYTHON_VERSION "3.10.9"
# OSRM binaries
FROM ghcr.io/project-osrm/osrm-backend:v6.0.0 AS osrm

# Valhalla binaries
FROM ghcr.io/valhalla/valhalla:3.6.1 AS valhalla

# Prime server build
FROM debian:bookworm AS prime_build
RUN apt-get update && apt-get install -y \
git cmake make gcc g++ pkg-config \
libcurl4-openssl-dev libzmq3-dev libczmq-dev

RUN git clone --depth 1 --recursive https://github.com/kevinkreiser/prime_server.git
WORKDIR /prime_server
RUN cmake -B build . && cmake --build build && make -C build install

# Final runtime image
FROM python:3.10.19-slim-trixie AS r2gg

ENV PYTHON_VERSION="3.10.9"
ENV HOME=/home

### Installation des dépendances pour OSRM
RUN apt update && apt install -y libboost-dev libboost-filesystem-dev libboost-thread-dev \
libboost-system-dev libboost-regex-dev libxml2-dev libsparsehash-dev \
libgomp1 liblua5.3-dev \
pkg-config libgdal-dev libboost-program-options-dev libboost-iostreams-dev \
libboost-test-dev libtbb-dev libexpat1-dev

### Installation des dépendances pour Valhalla
RUN apt-get update && \
apt-get install -y libtool pkg-config curl unzip jq lcov protobuf-compiler \
vim-common locales libcurl4-openssl-dev zlib1g-dev liblz4-dev libprotobuf-dev && \
apt-get install -y libgeos-dev libgeos++-dev libluajit-5.1-dev libspatialite-dev libsqlite3-dev wget sqlite3 spatialite-bin python3-shapely && \
apt-get install -y libsqlite3-mod-spatialite
RUN apt-get install -y git libcurl4-openssl-dev libzmq3-dev libczmq-dev

### Installation d'OSRM
COPY --from=build /home/osrm/osrm-backend-5.26.0/build/OSRM-0.1.1-Linux.tar.gz ./
RUN tar -xzvf OSRM-0.1.1-Linux.tar.gz && cd OSRM-0.1.1-Linux && cp -r bin/* /usr/bin/ && cp -r lib/* /usr/lib/ && cp -r include/* /usr/include/ && cp -r share/* /usr/share/
# Runtime dependencies only
RUN apt-get update && apt-get install -y \
libboost-filesystem-dev libboost-system-dev \
libcurl4 libprotobuf-dev libgeos-dev \
libluajit-5.1-2 libsqlite3-mod-spatialite \
&& rm -rf /var/lib/apt/lists/*

COPY --from=osrm /usr/local/bin/osrm-* /usr/local/bin/
COPY --from=osrm /usr/local/lib /usr/local/lib

### Installation prime-server
COPY --from=build /usr/local/lib/libprime_server.so.0.7.2 /usr/lib/libprime_server.so.0.0.0
COPY --from=build /usr/local/lib/libprime_server.so.0 /usr/lib/libprime_server.so.0
COPY --from=build /usr/local/lib/libprime_server.so /usr/lib/libprime_server.so
COPY --from=prime_build /usr/local/lib/libprime_server.so* /usr/lib/

### Installation de valhalla
COPY --from=build /home/valhalla/valhalla/build/valhalla-3.2.0-Linux.tar.gz ./
RUN tar -xzvf valhalla-3.2.0-Linux.tar.gz && cd valhalla-3.2.0-Linux && cp -r bin/* /usr/bin/ && cp -r lib/* /usr/lib/ && cp -r include/* /usr/include/ && cp -r share/* /usr/share/
COPY --from=valhalla /usr/local/bin/valhalla_* /usr/local/bin/
COPY --from=valhalla /usr/local/lib/libvalhalla* /usr/local/lib/

### Installation des dépendances pour psycopg2
RUN apt update && \
Expand Down
Loading