Skip to content

Commit 303fe52

Browse files
committed
Initial Dockerfile (#6)
1 parent 8e80133 commit 303fe52

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM ubuntu:14.04
2+
3+
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
4+
5+
ARG PACKAGES="git"
6+
ARG BUILD_DEPS="build-essential autoconf automake libtool m4 libgmp-dev"
7+
8+
RUN apt-get update
9+
RUN apt-get install -y $PACKAGES
10+
RUN apt-get install -y $BUILD_DEPS
11+
12+
# Install op-solver
13+
WORKDIR /src
14+
RUN set -x \
15+
&& git clone --depth 1 https://github.com/gkobeaga/op-solver \
16+
&& ( \
17+
cd op-solver \
18+
&& ./autogen.sh \
19+
&& mkdir build && cd build \
20+
&& ../configure \
21+
&& make \
22+
&& make check \
23+
&& make distcheck \
24+
&& make install \
25+
)
26+
27+
# Download OPLib
28+
WORKDIR /
29+
RUN set -x \
30+
&& git clone --depth 1 https://github.com/bcamath-ds/OPLib
31+
32+
WORKDIR /tmp
33+
ENTRYPOINT ["/usr/local/bin/op-solver"]

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@ You can increase the verbosity of the RB\&C with:
102102
./src/op-solver opt --op-exact 1 --op-exact-bac-verbose 1 OPLib/instances/gen3/kroA150-gen3-50.oplib
103103
```
104104

105+
## Running on Docker
106+
107+
> Only available only for the heuristic algorithm.
108+
109+
```sh
110+
git clone https://github.com/gkobeaga/op-solver
111+
cd op-solver
112+
docker build -t op-solver .
113+
mkdir tmp
114+
docker run -v $PWD/tmp:/tmp -it --rm op-solver opt /OPLib/instances/gen3/kroA150-gen3-50.oplib
115+
cat tmp/stats.json
116+
```
117+
105118
## Output
106119

107120
By default, the results of the runs are written in a common `stats.json` file.

0 commit comments

Comments
 (0)