Skip to content

Commit

Permalink
old school make
Browse files Browse the repository at this point in the history
  • Loading branch information
alain-andre committed Jan 18, 2023
1 parent a8ea1b1 commit f346017
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,11 @@ RUN apt-get update > /dev/null && \
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
RUN make third_party && \
make cc

ADD . /srv/optimizer-ortools

WORKDIR /srv/optimizer-ortools
RUN make tsp_simple && \
cd .. && \
rm -R /srv/or-tools
RUN rm -R /srv/or-tools/docs /srv/or-tools/examples && \
make tsp_simple

0 comments on commit f346017

Please sign in to comment.