Coder Social home page Coder Social logo

Comments (10)

nilsnolde avatar nilsnolde commented on August 29, 2024 1

I didn't try it in a long time and not ever with OSRM. I'll try to find time one of these days and update here or the README. I'm still confused what's not supposed to work (what's the exact error)..

from vroom-docker.

nilsnolde avatar nilsnolde commented on August 29, 2024 1

Ok, you will have to change the docker-compose, it can't know where your files are.

  osrm:
    image: osrm/osrm-backend
    container_name: osrm
    restart: always
    ports:
      - 5000:5000
    volumes:
      - ./osrm:/data
    command: "osrm-routed --max-matching-size 1000 --max-table-size 1000 --max-viaroute-size 1000 --algorithm mld /data/map.osrm"

if you used it exactly like that it indeed won't work. your files are in ./osrm/data but the volume maps ./osrm to the container's /data and also your file is not called map.osrm but austria-latest.osrm.

Try this:

  osrm:
    image: osrm/osrm-backend
    container_name: osrm
    restart: always
    ports:
      - 5000:5000
    volumes:
      - ./osrm/data:/data
    command: "osrm-routed --max-matching-size 1000 --max-table-size 1000 --max-viaroute-size 1000 --algorithm mld /data/austria-latest.osrm"

from vroom-docker.

jcoupey avatar jcoupey commented on August 29, 2024

I don't think this has anything to do with vroom or even the Docker setup in this repo. The error you're seeing is an OSRM error.

I think this means that I have not correctly mounted the files inside my docker container

Your own diagnosis is probably the right one. The OSRM GitHub bugtracker contains many issues with hints on how to do this.

from vroom-docker.

Shooter533 avatar Shooter533 commented on August 29, 2024

Just found out that if I run it like this it works fine
docker run -t -i -p 5000:5000 -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/australia-latest.osrm

But if I use the docker-compose up using the docker-compose.yml in this repo it fails

from vroom-docker.

 avatar commented on August 29, 2024

Thanks for your post!
I had exactly the same problem (Failed each time when trying to perform the setup according to the readme). Therefore, I thought it might be helpful to post a summarized Workaround.

Definition of the Problem/Error
When trying to install osrm and vroom following the Readme, one is asked to preprocess Data from OSRM Website (which is so far working)
The next step is to run the cloned git repo using
docker-compose up -d
which yields the following error

$ docker-compose up -d
Creating osrm ... done
Creating vroom ... done
$ docker logs osrm
[warn] Missing/Broken File: /austria-latest/map.osrm.ramIndex
[warn] Missing/Broken File: /austria-latest/map.osrm.fileIndex
[warn] Missing/Broken File: /austria-latest/map.osrm.edges
[warn] Missing/Broken File: /austria-latest/map.osrm.geometry
[warn] Missing/Broken File: /austria-latest/map.osrm.turn_weight_penalties
[warn] Missing/Broken File: /austria-latest/map.osrm.turn_duration_penalties
[warn] Missing/Broken File: /austria-latest/map.osrm.datasource_names
[warn] Missing/Broken File: /austria-latest/map.osrm.names
[warn] Missing/Broken File: /austria-latest/map.osrm.timestamp
[warn] Missing/Broken File: /austria-latest/map.osrm.properties
[warn] Missing/Broken File: /austria-latest/map.osrm.icd
[warn] Missing/Broken File: /austria-latest/map.osrm.maneuver_overrides
[error] Required files are missing, cannot continue

Workaround for installing VROOM+VROOM-Frontend+OSRM using Docker
(Note: This workflow was tested on Linux, there seems to be some troubles on Windows)

  1. Preprocess Data from OSRM Website
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-partition /data/berlin-latest.osrm
docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-customize /data/berlin-latest.osrm
  1. Clone VROOM-Docker repo
    git clone https://github.com/VROOM-Project/vroom-docker.git

  2. Modify your docker-compose.yml file according to your needs
    In this case, change
    /data/map.osrm
    to
    /data/berlin-latest.osrm

  3. Start OSRM and VROOM seperately! (According to the readme one would start it using docker-compose up -d but this seems to yield errors)
    docker run -t -i -p 5000:5000 -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/berlin-latest.osrm

To start the vroom docker I modified the docker-compose.yml and commented out all lines except:

version: "2.4"
services:
  vroom:
    network_mode: host
    image: vroomvrp/vroom-docker:v1.10.0
    container_name: vroom
    volumes:
      - ./vroom-conf/:/conf
    environment:
      - VROOM_ROUTER=osrm  # router to use, osrm, valhalla or ors

and started it using docker-compose up -d

  1. Clone the Frontend Repo using
    git clone https://github.com/VROOM-Project/vroom-frontend.git
    and install it according to the Readme and run it using
    npm run serve

Since I spend quite some time until everything was finally working, it thought this post might help.

One remark:
If this Bug/Error continuous (eg. not fixed for the time being), it might be a good idea to make a short remark in the Readme of the VROOM-Docker repo ... otherwise people will wonder what in earth they're doing wrong if they perform the setup exactly as described and nothing is working^^.

from vroom-docker.

 avatar commented on August 29, 2024

I updated my comment, hopefully the error definition is a bit clearer now?

PS: I was using OSRM only because the frontend-readme said that it's only compatible with OSRM? Otherwise, I'd prefer Valhalla anyway ...

from vroom-docker.

nilsnolde avatar nilsnolde commented on August 29, 2024

I see. Can you share your docker-compose.yml, which OS you're on and a quick screenshot of the directory layout?

Valhalla has https://github.com/valhalla/demos, but that's not near as nice as osrm frontend, it's mostly for debugging. Other than that I published a QGIS plugin not tooo long ago: https://plugins.qgis.org/plugins/valhalla/.

from vroom-docker.

 avatar commented on August 29, 2024

I use the "standard" docker-compose.yml from the repo, the OS is Ubuntu 20.04. Concerning the directory layout, I tried various constellations (e.g. extracting the OSRM data in different folders), none of them worked. Here's the layout of extracting the osrm data in vroom-docker/osrm/data (using the commands from my first post "1. Preprocess Data from OSRM Website")

:~/Documents/VROOM-Docker/vroom-docker/osrm/data$ ls
austria-latest.osm.pbf
austria-latest.osrm
austria-latest.osrm.cell_metrics
austria-latest.osrm.cells
austria-latest.osrm.cnbg
austria-latest.osrm.cnbg_to_ebg
austria-latest.osrm.datasource_names
austria-latest.osrm.ebg
austria-latest.osrm.ebg_nodes
austria-latest.osrm.edges
austria-latest.osrm.enw
austria-latest.osrm.fileIndex
austria-latest.osrm.geometry
austria-latest.osrm.icd
austria-latest.osrm.maneuver_overrides
austria-latest.osrm.mldgr
austria-latest.osrm.names
austria-latest.osrm.nbg_nodes
austria-latest.osrm.partition
austria-latest.osrm.properties
austria-latest.osrm.ramIndex
austria-latest.osrm.restrictions
austria-latest.osrm.timestamp
austria-latest.osrm.tld
austria-latest.osrm.tls
austria-latest.osrm.turn_duration_penalties
austria-latest.osrm.turn_penalties_index
austria-latest.osrm.turn_weight_penalties
init_OSRM.sh

from vroom-docker.

 avatar commented on August 29, 2024

Uhhh yes, thanks!!!
The renaming map.osrm to austria-latest.osrm was a copy-paste mistake, but the location of the files are the real problem!
Thanks so much!!!

from vroom-docker.

nilsnolde avatar nilsnolde commented on August 29, 2024

Cool happy it got resolved. I'll add a comment to the docker-compose.yml to make it more obvious

from vroom-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.