Replies: 3 comments 2 replies
-
Couple of thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Ok, that solves my problem. I built the upstream image with name The curl requests now work, as well as the test script from the docker-valhalla readme. Thank you! @nilsnolde |
Beta Was this translation helpful? Give feedback.
-
@sharbel97 thanks for sharing the experience. Could you please also share a step by step instruction from the scratch? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I've spent a number of hours trying to run valhalla using docker. I'm new to docker and with this project this is the first time I tried to learn docker thoroughly. I believe this discussion will help to lower the initial barrier to first time contributors using M1 Mac.
Few issues, and I'm having trouble differentiating between the 2 images valhalla has.
Finding (1): Both images when pulled from docker hub, exit immediately upon running due to (I believe) mismatch platform architecture. I tried pulling (and running) with
--platform linux/arm64
but nothing works here. Same result. How I pulled/ran is attached at the end of this description. Container logs are empty. Docker is enabled to emulate.Finding (2): Next step I tried is building image with the Dockerfile given. The native valhalla image builds fine, and runs with no errors, but every
curl
request I tried returnscurl: (52) Empty reply from server
. How I built/ran is attached at the end of this description. Container logs are empty.The gis-ops image however doesn't build due to an error (I tried pip install, didn't work):
How I built (same for both images)
in docker-valhalla:
docker build -t ghcr.io/gis-ops/docker-valhalla/valhalla:latest .
[errors when building only, not pulling]in valhalla:
docker build -t valhalla/valhalla:latest .
[success]With and without the
--platform
flag attempted, same result.How I ran the images, assume I already downloaded the tiles (pbf) in custom_files
gis-ops image
docker run -dt --name valhalla -p 8002:8002 -v $PWD/custom_files:/custom_files ghcr.io/gis-ops/docker-valhalla/valhalla:latest
native image
docker run -dt --name valhalla -p 8002:8002 -v $PWD/custom_files:/custom_files valhalla/valhalla:latest
At no point in the whole process do I get messages saying graph is being built. The tiles are in fact mounted inside the container when I run it, checked via docker dashboard.
How I curl'd
I tried the same curl instructions from
docker-valhalla/tests/test.sh
there is a curl instruction there appropriate for the Andorra tiles.curl -s -XPOST 'http://localhost:8002/route' -H'Content-Type: application/json' --data-raw '{"locations":[{"lat": 42.546504,"lon": 1.591129},{"lat": 42.507667,"lon": 1.542721}],"costing": "auto"}'
and this one from docker-compose
curl http://localhost:8002/status
I believe I've tried all the options offered in README and other discussions in this repo the valhalla one. Any help or feedback is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions