"[error] Input file not found!" Docker OSRM
Asked Answered
T

3

8

I will preface this by saying I am a newbie.

Nonetheless, I am trying to run OSRM with Docker. I have tried to run the first OSRM backend docker command they list on their github:

docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf

A thing to note is that I changed This: ${PWD} from the original command in the OSRM backend To this: %cd%" Because I run docker on a windows 10 not Linux.

I also used a Geofabrik cutout that is in Denmark instead of Berlin (which they use in the demo version on Github).

Here is what I ran in the commando prompt:

docker run -t -v "%cd%":/data osrm/osrm-backend osrm-extract -p /opt/foot.lua /data/denmark-latest.osm.pbf

As you can see on the attached photo it starts pulling the "osrm/osrm-backend: latest". But I get the error message: "[error] Input file /data/denmark-latest.osm.pbf not found!"Which is odd because I have denmark-latest.osm.pbf stored in c -->docker -->data and also a copy in a folder on my desktop called osrm-backend-master where the profiles are in (foot.lua in my case) and in a folder called "data" I have stored denmark-latest.osm.pbf.

A few posts mention "shared drives" options as a solution to my problem but in my settings I don't have a "shared drive" option - which I think is because I run on WSL 2 (though I am not sure about that one).

Picture of CMD prompt:

CMD prompt

Can any of you see what I am doing wrong?

Thinker answered 4/4, 2021 at 8:0 Comment(1)
Hi Mads! I have this issue now. Did you find a solution?Acorn
P
3

follow steps and solve problem

  1. mkdir data
  2. cd data
  3. docker run -t -v "${PWD}:/data/" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/denmark-latest.osm.pbf
Personality answered 15/7, 2022 at 8:0 Comment(0)
F
2

I had a similar error a while ago. I tried something like this but I don't really remember:

docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/denmark-latest.osm.pbf

Also, you can add an extra "/" after first "data appearance" such as:

docker run -t -v "${PWD}:/data/" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/denmark-latest.osm.pbf

Or you can enter to your new data folder and run any of those commands.

Forbidding answered 1/5, 2021 at 20:57 Comment(0)
V
0

greetings and I hope you are well.

I had a similar error, and it was because I omitted part of the installation command, remember to follow the installation instructions to the letter.

In my case, I omitted the following part of the command: ':/data.osm.pbf'

I share the site commands: https://switch2osm.org/serving-tiles/using-a-docker-container/

Download map source file:

wget yourfile-map.pbf

Create docker volume:

docker volume create openstreetmap-data

Create container:

time docker run -v yourfile-map.pbf:/data.osm.pbf -v openstreetmap-data:/var/lib/postgresql/12/main overv/openstreetmap-tile-server:1.3.10 import

Start the server:

docker run -p 80:80 -v openstreetmap-data:/var/lib/postgresql/12/main -d overv/openstreetmap-tile-server:1.3.10 run
Varion answered 25/10, 2022 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.