Code Monkey home page Code Monkey logo

Comments (14)

merlinnot avatar merlinnot commented on May 24, 2024

What's the PBF_URL you've specified? Is it the default one?

from nominatim-docker.

yonaichin avatar yonaichin commented on May 24, 2024

Yes,
Tried to build nominatim planet with the scrtips.

docker build github.com/merlinnot/nominatim-docker \
  -t nominatim \
  --build-arg BUILD_THREADS=16 \
  --build-arg BUILD_MEMORY=32GB \
  --build-arg OSM2PGSQL_CACHE=28000 \
  --build-arg RUNTIME_THREADS=2 \
  --build-arg RUNTIME_MEMORY=8GB

from nominatim-docker.

merlinnot avatar merlinnot commented on May 24, 2024

You should probably lower your memory limit a bit, as stated in the docs, BUILD_MEMORY is a memory dedicated to a build process, if you have 32GB total, you still need some for system etc. The same goes for BUILD_THREADS.

OSM2PGSQL_CACHE should be lower too, as you can see in the docs it should be set to about 75% of memory available during build process.

Anyways, is your system behind some kind of a proxy, which might affect the download process? Map extracts are being downloaded form the Internet, by default from
https://planet.osm.org/pbf/planet-latest.osm.pbf. Can you try to download it using wget or curl, just to confirm that it's not a network issue?

from nominatim-docker.

merlinnot avatar merlinnot commented on May 24, 2024

Btw., my company provides Nominatim API as a service if you'd be interested.

from nominatim-docker.

yonaichin avatar yonaichin commented on May 24, 2024

The network wasn't the issue.
PBF file was downloaded successfully via curl.

Tried the different approach that copy the PBF file during the build process and still failed.

Error processing tar file(exit status 1): unexpected EOF

The Dockerfile was modified as below

# ARG PBF_URL=https://planet.osm.org/pbf/planet-latest.osm.pbf
# RUN curl -L ${PBF_URL} --create-dirs -o /srv/nominatim/src/data.osm.pbf
RUN mkdir /srv/nominatim/src
COPY data.osm.pbf /srv/nominatim/src/data.osm.pbf

I've adjusted the machine settings to 10 Cores CPU and 48GB MEM.
Building nominatim for cities works just fine.

Is it possible that the problem was the file exceeds the docker build limits?

Thanks

from nominatim-docker.

merlinnot avatar merlinnot commented on May 24, 2024

It should handle the file having much less memory, I've successfully built planet on 8GB machine in the past.

Did you adjust (lower) your OSM2PGSQL_CACHE settings?
Can you post a link to a full log (please don't paste it here, you can use make a gist)?
Can you verify that a downloaded file matches this checksum?

from nominatim-docker.

yonaichin avatar yonaichin commented on May 24, 2024

I did adjust the OSM2PGSQL_CACHE settings.

docker build github.com/merlinnot/nominatim-docker   -t nominatim-planet   \
--build-arg BUILD_THREADS=2   \
--build-arg BUILD_MEMORY=8GB   \
--build-arg OSM2PGSQL_CACHE=2000   \
--build-arg RUNTIME_THREADS=2   \
--build-arg RUNTIME_MEMORY=8GB

Here's the log

The checksum matched the version of 2018-07-19 PBF file.

85291e7cc8cfdc20f2e62a8650b2d069  planet-latest.osm.pbf

from nominatim-docker.

konrad-g avatar konrad-g commented on May 24, 2024

I got the same issue. Did you solve it by any chance @yonaichin? I'm running this on quite a strong machine, 50GB of RAM and 10 cores.

from nominatim-docker.

yonaichin avatar yonaichin commented on May 24, 2024

@konrad-g

No, I did not.
Though I've passed this step successfully on my mac, there wasn't enough disk space to go through the whole docker process. I ran into this problem on the machine with Linux 16.04.
Still, I'm not able to pinpoint what the root cause really is.

Instead of using docker to build planet, I'm building it on vm following nominatim guideline which has more configurations to be tuned with.

from nominatim-docker.

twentytwokhz avatar twentytwokhz commented on May 24, 2024

#offtopic How can I check if the build for nominatim completed or not? I started an ssh session into the VM machine for building nominatim. Then I executed the build, which is still running after 2 days. Can I stop the ssh session and then check back later and see some logs or files to validate that the build has completed? Another question is: does the build allow to resume after it has been stopped?

from nominatim-docker.

merlinnot avatar merlinnot commented on May 24, 2024

Hey, could you try building Monaco to test if it's a general problem or just with the planet?

from nominatim-docker.

konrad-g avatar konrad-g commented on May 24, 2024

Works great with Monaco, it seems to be an issue related with the planet.
I got information that it might be related with following issue:
moby/moby#37581

from nominatim-docker.

merlinnot avatar merlinnot commented on May 24, 2024

Oh, great finding. It might be the one, the file is bigger than 8GB.

from nominatim-docker.

chmelej avatar chmelej commented on May 24, 2024

FYI see moby/moby#37581
some docker versions have a bug. you need upgrade or downgrade docker to avoid

from nominatim-docker.

Related Issues (18)

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.