Public Repository

Last pushed: 4 months ago
Short Description
my osrm docker
Full Description

command to launch (examples):
docker run -dit -v $(pwd):/data -e DBFILE=/data/planet-latest.osm.pbf -e STXXL=/data/stxxl2.txt -e ACTION=extract --privileged infiltratory/osrm-parametrable

or

docker run -dit -v F:\Documents\git\osrm:/data -e DBFILE=/data/planet-latest.osm.pbf -e ACTION=extract -e SWAP=100G --privileged infiltratory/osrm-parametrable

then

docker run -dit -v F:\Documents\git\osrm:/data -e DBFILE=/data/planet-latest.osrm -e ACTION=contract -e SWAP=100G --privileged infiltratory/osrm-parametrable

then launch the server

docker run -dit -p 5000:5000 -v F:\Documents\git\osrm:/data -e DBFILE=/data/planet-latest.osrm -e ACTION=routed -e SWAP=100G --privileged infiltratory/osrm-parametrable

Parameters:
-ACTION is extract(extracting datas), contract(processing datas), routed (exposing the api) (required)
-DBFILE is the database file .pbf (required)
-STXXL is the configuration file for intermediate calculations extract (optional)
-SWAP Modify the swap value 1M,1G, be careful as the space will be reserved(only work for hyper-v win)(optional)

before stopping the container do (not needed if you use docker-machine) :
launch exec of kinematic or similar command
cd /bash
./stop.sh

commit and push :
docker login --username=<user username>
docker commit <container ID> <repo name>/<image>
docker push <repo name>/<image>

config for docker tools (150G needed to build europe, change value depending on the osm file) :
docker-machine rm default
docker-machine create -d virtualbox --virtualbox-memory=4096 --virtualbox-cpu-count=4 --virtualbox-disk-size=150000 default
docker-machine ssh default
tce-load -wi util-linux
sudo fallocate -l 100G /mnt/sda1/swapfile
sudo mkswap /mnt/sda1/swapfile
sudo swapon /mnt/sda1/swapfile

config for hyper-v :
Launch hyper-v manager
Choose the size of the docker (150G needed to build europe, change value depending on the osm file)

Delete all images :
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

Docker Pull Command
Owner
infiltratory

Comments (0)