我正在尝试使用Docker设置一个OSRM后端服务器。主机是一个运行OS10.14 (Mojave)的32 is内存的MacBook Pro。
下载了england-latest.osm.pbf文件后,我尝试使用以下命令启动进程。
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/england-latest.osm.pbf产出如下:
[info] Parsed 0 location-dependent features with 0 GeoJSON polygons
[info] Using script /opt/car.lua
[info] Input file: england-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 6
[info] Parsing in progress..
[info] input file generated by osmium/1.8.0
[info] timestamp: 2018-11-02T21:15:02Z
[info] Using profile api version 4
[info] Found 3 turn restriction tags:
[info] motorcar
[info] motor_vehicle
[info] vehicle
[info] Parse relations ...
[info] Parse ways and nodes ...
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4此时,进程会悄无声息地失败,并且不会编写任何您期望的文件。如果我使用更大的-london-latest.osm.pbf文件,那么一切正常,所以我猜这是某种内存约束。我该如何找出问题并加以解决?
发布于 2019-09-19 16:45:39
在我的Mac上遇到同样的问题后,我通过增加Docker可用的内存来解决这个问题。在菜单上查找鲸鱼图标,然后选择Preferences > Advanced。将滑块更改为更高的数量,按“应用并重新启动”,然后再试运行。
https://docs.docker.com/docker-for-mac/#memory
我可以在2GB的默认限制内运行415 2GB文件(加拿大>不列颠哥伦比亚省),但没有比这更大的文件。如果英格兰文件是422 it,您可能会增加到4GB,并让它工作。(试图运行整个加拿大的2.4GB文件,需要>8GB的RAM。)
https://stackoverflow.com/questions/53157542
复制相似问题