Code Monkey home page Code Monkey logo

vroom-docker's Introduction

VROOM Docker

This repository contains dockerized Vehicle Routing Open-source Optimization Machine (VROOM)

This project highly inspired and inherited from chesty's dockerized vroom.

Usage

Just modify the config.js file as you wish and build the image. The image builds vroom-backend (core) and exposes vroom-express API through port 3000 by default. You should modify config.js file especially to specify route profiles indicated by var routingServers.

Compose File


See the gist here for the "docker-compose file stack" I created.

vroom-docker's People

Contributors

iedmrc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vroom-docker's Issues

Error when trying to build with Dockerfile

Hey @iedmrc, when I build with Dockerfile I get an error when is trying to install VROOM:

routing/libosrm_wrapper.cpp: In member function 'virtual vroom::Matrix<unsigned int> vroom::routing::LibosrmWrapper::get_matrix(const std::vector<vroom::Location>&) const':
routing/libosrm_wrapper.cpp:46:51: error: no matching function for call to 'osrm::OSRM::Table(osrm::engine::api::TableParameters&, osrm::util::json::Object&) const'
   osrm::Status status = _osrm.Table(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:96:12: note: candidate: 'osrm::engine::Status osrm::OSRM::Table(const osrm::engine::api::TableParameters&, osrm::engine::api::ResultT&) const'
     Status Table(const TableParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^~~~~
/usr/local/include/osrm/osrm.hpp:96:12: note:   no known conversion for argument 2 from 'osrm::util::json::Object' to 'osrm::engine::api::ResultT&' {aka 'mapbox::util::variant<osrm::util::json::Object, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&'}
routing/libosrm_wrapper.cpp: In member function 'virtual void vroom::routing::LibosrmWrapper::add_route_info(vroom::Route&) const':
routing/libosrm_wrapper.cpp:111:51: error: no matching function for call to 'osrm::OSRM::Route(osrm::engine::api::RouteParameters&, osrm::util::json::Object&) const'
   osrm::Status status = _osrm.Route(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:87:12: note: candidate: 'osrm::engine::Status osrm::OSRM::Route(const osrm::engine::api::RouteParameters&, osrm::engine::api::ResultT&) const'
     Status Route(const RouteParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^~~~~
/usr/local/include/osrm/osrm.hpp:87:12: note:   no known conversion for argument 2 from 'osrm::util::json::Object' to 'osrm::engine::api::ResultT&' {aka 'mapbox::util::variant<osrm::util::json::Object, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&'}
make: *** [makefile:52: routing/libosrm_wrapper.o] Error 1

docker build fail

Hello,

I'm student working on VROOM for a university project.
I followed your post there: https://dev.to/iedmrc/vehicle-routing-problems-and-how-to-solve-them-8h3
The goal is to modify VROOM and adapt it to our needs, but when I want to build an image of this repo I have this trace:

Sending build context to Docker daemon  67.58kB
Step 1/14 : FROM debian:buster-slim as buildstage
 ---> 8e022c70c28b
Step 2/14 : LABEL maintainer="Ibrahim Ethem DEMIRCI <https://ibrahim.demirci.com>"
 ---> Using cache
 ---> dac90930bc5b
Step 3/14 : RUN apt-get update &&     apt-get install -y git pkg-config &&     apt-get -y --no-install-recommends install cmake make git gcc g++ libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev         libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev -o APT::Install-Suggests=0 -o APT::Install-Recommends=0
 ---> Using cache
 ---> 8fe3d4f9a3cb
Step 4/14 : RUN git clone --depth 1 https://github.com/Project-OSRM/osrm-backend.git &&     cd osrm-backend &&     echo "Building OSRM ${DOCKER_TAG}" &&     git show --format="%H" | head -n1 > /opt/OSRM_GITSHA &&     echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" &&     mkdir -p build &&     cd build &&     BUILD_TYPE="Release" &&     ENABLE_ASSERTIONS="Off" &&     BUILD_TOOLS="Off" &&     case ${DOCKER_TAG} in *"-debug"*) BUILD_TYPE="Debug";; esac &&     case ${DOCKER_TAG} in *"-assertions"*) BUILD_TYPE="RelWithDebInfo" && ENABLE_ASSERTIONS="On" && BUILD_TOOLS="On";; esac &&     echo "Building ${BUILD_TYPE} with ENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} BUILD_TOOLS=${BUILD_TOOLS}" &&     cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=On &&     make install &&     cd ../profiles &&     cp -r * /opt &&     ldconfig
 ---> Using cache
 ---> 6c7755990ccc
Step 5/14 : RUN git clone --depth 1 https://github.com/VROOM-Project/vroom.git &&     mkdir vroom/bin &&     cd vroom/src &&     make &&     rm -rf /usr/local/lib/libosrm* &&     cp ../bin/* /usr/local/bin &&     strip /usr/local/bin/*
 ---> Running in 79bb4dbe5789
Cloning into 'vroom'...
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c main.cpp -o main.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/munkres.cpp -o algorithms/munkres.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/kruskal.cpp -o algorithms/kruskal.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/local_search/operator.cpp -o algorithms/local_search/operator.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/local_search/local_search.cpp -o algorithms/local_search/local_search.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c algorithms/heuristics/solomon.cpp -o algorithms/heuristics/solomon.o
g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -flto -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/local/include/osrm -D USE_LIBOSRM=true -c routing/libosrm_wrapper.cpp -o routing/libosrm_wrapper.o
routing/libosrm_wrapper.cpp: In member function 'virtual vroom::Matrix<unsigned int> vroom::routing::LibosrmWrapper::get_matrix(const std::vector<vroom::Location>&) const':
routing/libosrm_wrapper.cpp:46:51: error: no matching function for call to 'osrm::OSRM::Table(osrm::engine::api::TableParameters&, osrm::util::json::Object&) const'
   osrm::Status status = _osrm.Table(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:96:12: note: candidate: 'osrm::engine::Status osrm::OSRM::Table(const osrm::engine::api::TableParameters&, osrm::engine::api::ResultT&) const'
     Status Table(const TableParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^~~~~
/usr/local/include/osrm/osrm.hpp:96:12: note:   no known conversion for argument 2 from 'osrm::util::json::Object' to 'osrm::engine::api::ResultT&' {aka 'mapbox::util::variant<osrm::util::json::Object, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&'}
routing/libosrm_wrapper.cpp: In member function 'virtual void vroom::routing::LibosrmWrapper::add_route_info(vroom::Route&) const':
routing/libosrm_wrapper.cpp:111:51: error: no matching function for call to 'osrm::OSRM::Route(osrm::engine::api::RouteParameters&, osrm::util::json::Object&) const'
   osrm::Status status = _osrm.Route(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:87:12: note: candidate: 'osrm::engine::Status osrm::OSRM::Route(const osrm::engine::api::RouteParameters&, osrm::engine::api::ResultT&) const'
     Status Route(const RouteParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^~~~~
/usr/local/include/osrm/osrm.hpp:87:12: note:   no known conversion for argument 2 from 'osrm::util::json::Object' to 'osrm::engine::api::ResultT&' {aka 'mapbox::util::variant<osrm::util::json::Object, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&'}
make: *** [makefile:52: routing/libosrm_wrapper.o] Error 1
The command '/bin/sh -c git clone --depth 1 https://github.com/VROOM-Project/vroom.git &&     mkdir vroom/bin &&     cd vroom/src &&     make &&     rm -rf /usr/local/lib/libosrm* &&     cp ../bin/* /usr/local/bin &&     strip /usr/local/bin/*' returned a non-zero code: 2

Note that your vroom-frontend-docker repo build correctly.
Note also that the same error occurs with chesty's repo, but from his answer to the issue your raised on his repo, I prefer to address this to you.

Hopefully, this is just a dummy mistake because I'm not a Docker expert.
Any help would be greatly appreciated.

Thanks!

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.