-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb2281
commit a8ea1b1
Showing
5 changed files
with
24 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ARCHITECTURE=arm64v8/ | ||
RUBY_VERSION=2.6 | ||
RUBY_VERSION=2.5 | ||
ORTOOLS_VERSION=v7.8 # select from https://github.com/google/or-tools/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,31 @@ ARG ARCHITECTURE | |
|
||
FROM ${ARCHITECTURE}ruby:${RUBY_VERSION} | ||
|
||
ARG ORTOOLS_URL=${ORTOOLS_URL} | ||
ARG ORTOOLS_VERSION=${ORTOOLS_VERSION} | ||
|
||
LABEL maintainer="Mapotempo <[email protected]>" | ||
|
||
WORKDIR /srv/ | ||
|
||
RUN apt-get update > /dev/null && \ | ||
apt-get -y install git wget pkg-config build-essential cmake autoconf libtool zlib1g-dev lsb-release > /dev/null | ||
|
||
ADD . /srv/or-tools | ||
|
||
RUN wget -qO- $ORTOOLS_URL | tar xz --strip-components=1 -C /srv/or-tools | ||
apt install -y git build-essential cmake swig lsb-release python3-pip autoconf libtool zlib1g-dev > /dev/null && \ | ||
git clone -b ${ORTOOLS_VERSION} https://github.com/google/or-tools /srv/or-tools | ||
|
||
# tmp until ruby image have the good cmake version | ||
RUN curl 'https://github.com/Kitware/CMake/releases/download/v3.15.7/cmake-3.15.7.tar.gz' -s -L -R -o cmake.tar.gz && \ | ||
tar -zxvf cmake.tar.gz && \ | ||
cd cmake-3.15.7 && \ | ||
./bootstrap && \ | ||
make && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -R cmake-3.15.7 cmake.tar.gz | ||
|
||
WORKDIR /srv/or-tools | ||
RUN /usr/local/bin/cmake -S . -B build -DBUILD_DEPS=ON -DBUILD_PYTHON=ON && \ | ||
/usr/local/bin/cmake --build build --config Release --target install -v | ||
|
||
ADD . /srv/optimizer-ortools | ||
|
||
WORKDIR /srv/optimizer-ortools | ||
RUN make tsp_simple | ||
RUN make tsp_simple && \ | ||
cd .. && \ | ||
rm -R /srv/or-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters