0

trying to run custom profile in osrm on docker but gives this error:

what(): lua: error: /opt/moto.lua:9: module 'lib/traffic_signal' not found:
no field package.preload['lib/traffic_signal']
no file '/opt/lib/traffic_signal.lua'
no file '/usr/local/share/lua/5.2/lib/traffic_signal.lua'
no file '/usr/local/share/lua/5.2/lib/traffic_signal/init.lua'
no file '/usr/local/lib/lua/5.2/lib/traffic_signal.lua'
no file '/usr/local/lib/lua/5.2/lib/traffic_signal/init.lua'
no file '/usr/share/lua/5.2/lib/traffic_signal.lua'
no file '/usr/share/lua/5.2/lib/traffic_signal/init.lua'
no file './lib/traffic_signal.lua'
no file '/usr/local/lib/lua/5.2/lib/traffic_signal.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/lib/traffic_signal.so'
no file '/usr/lib/lua/5.2/lib/traffic_signal.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './lib/traffic_signal.so'

according to the error it does not recognize the listed dependencies but the dependencies were added as is

-- vehicle custom

api_version = 4

Set = require('lib/set')
Sequence = require('lib/sequence')
Handlers = require("lib/way_handlers")
Relations = require("lib/relations")
TrafficSignal = require("lib/traffic_signal")
find_access_tag = require("lib/access").find_access_tag
limit = require("lib/maxspeed").limit
Utils = require("lib/utils")
Measure = require("lib/measure")

The vehiclecustom.lua profile was copied to the container creating a dockerfile:

FROM osrm/osrm-backend

COPY vehiclecustom.lua/opt/carcustom.lua

These configuration steps were performed to run the vehiclecustom.lua profile

sudo docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/vehiclecustom.lua /data/north-eastern-zone-latest.osm.pbf
sudo docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-partition /data/north-eastern-zone-latest.osrm
sudo docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-customize /data/north-eastern-zone-latest.osrm
sudo docker run -d -p 5000:5000 --rm --name osrm -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/north-eastern-zone-latest.osrm

also copied the car.lua profile from the official osrm repository renaming it to vehiclecustom.lua without modifying anything nor touching any code, the same process of passing the file to the container and configuring the docker as previously shown was done again and the same error occurred again, but when I run the default osrm profiles like car.lua it runs successfully I would greatly appreciate it if someone could help;

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.