[OSRM-talk] Docker pre-processing from a python script

Daniel Patterson daniel at mapbox.com
Wed Jul 10 16:57:29 UTC 2019


It'd be something like this (untested):

subprocess.run(["docker","run","-t","-v", "%s:/data" % os.getcwd(),
"osrm/osrm-backend", "osrm-extract -p /opt/car.lua
/data/berlin-latest.osm.pbf"])

daniel

On Wed, Jul 10, 2019 at 7:22 AM Silvia Oviedo <siljuovi87 at gmail.com> wrote:

>
> Hi all,
>
> I would like to run the pre-process of the car profile from a python
> script. I have checked the documentation of subprocess library and  docker
> SDK for python but I donĀ“t know how to properly make the request. For
> example, how could I transform the sh request:
>
> docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
>
> So it can be done from python. Is that possible?
>
>
> Thank you in advance
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20190710/92ed6fd3/attachment.html>


More information about the OSRM-talk mailing list