Ors+vroom for optimization using docker

Hi, I’ve tried most of the answers related to similar topics, but I can’t find any solution. I want to create an optimization app using ORS (OpenRouteService) and Vroom on my localhost. I installed ORS following the tutorial ‘Running with Docker’ in the OpenRouteService documentation. However, I can’t even check http://localhost:8080/ors/v2/directions/driving-car?&start=8.681495,49.41461&end=8.687872,49.420318 because it returns an error with code 2099 and the message ‘Unable to get an appropriate route profile for RoutePreference = driving-car’, and the health status is ‘not ready’. Here is my docker-compose.yml

version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - "8080:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:latest
    user: "${UID:-0}:${GID:-0}"
#    build:
#      context: ./
#      args:
#        OSM_FILE: ./ors-api/src/test/files/heidelberg.osm.gz
    volumes:
      - ./docker/graphs:/home/ors/ors-core/data/graphs
      - ./docker/elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./docker/logs/ors:/home/ors/logs
      - ./docker/logs/tomcat:/home/ors/tomcat/logs
      - ./docker/conf:/home/ors/ors-conf
      - ./docker/data:/home/ors/ors-core/data
      - ./belgium-latest.osm.pbf:/ors-core/data/osm_file.pbf
    environment:
      - BUILD_GRAPHS=True  # Forces the container to rebuild the graphs, e.g. when PBF is changed
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"

  vroom:
    container_name: vroom2
    image: vroomvrp/vroom-docker:v1.12.0
    network_mode: host
    volumes:
      - ./vroom-conf/:/conf
    environment:
      - VROOM_ROUTER=ors-app # router to use, osrm, valhalla or ors
    depends_on:
      - ors-app

Hey,

the health status “not ready” means that the ORS is not available, either because it is still building the graphs for your setup or because it encountered an error.

Best regards

Hi, and thanks for the fast response, but there aren’t any errors during the launch of the docker-compose file. How long does it take to build the graphs? I understand that the time needed to build the graph depends on the hardware, but no more lines are displayed in the terminal despite waiting for a few minutes.

Hey,

as I understand, you’re trying to build belgium.
The corresponding pbf has around 500MB, so I’d estimate this to take roughly 5-10 minutes per profile, so if you’re building the default 9 profiles, you’re looking at a waiting time of roughly 1 hour.

This is heavily dependent on the enabled optimizations though, but “a few minutes” is probably not enough.

Best regards

1 Like