Dockerfile 2.41 KB
Newer Older
Carl Mai's avatar
add ci  
Carl Mai committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# glpk also from https://github.com/dmccloskey/glpk/blob/master/Dockerfile

# Set the base image to Ubuntu
FROM ubuntu:latest
# Switch to root for install
USER root

RUN apt-get update -y && apt-get install -y \
	openjdk-8-jdk \
	libglpk-java \
	glpk-utils \
	--no-install-recommends \
	&& apt-get clean \
	&& rm -rf /var/lib/apt/lists/*

ENV HOME /home/user

RUN useradd --create-home --home-dir $HOME user \
    && chmod -R u+rwx $HOME \
    && chown -R user:user $HOME

# now prepare ttc18 folder
RUN mkdir /ttc18
RUN chown user:user -R /ttc18

USER user
WORKDIR /ttc18

# start optimization: first download
# see also here https://github.com/heroku/docker-gradle/blob/master/Dockerfile
ADD gradlew .
ADD gradle gradle
ADD gradle.properties .
ADD gradle gradle
ADD settings.gradle .
# following is not used as it needs too much maintenance
# ADD jastadd-mquat-solver-ilp/build.gradle jastadd-mquat-solver-ilp/build.gradle
# ADD jastadd-mquat-solver/build.gradle jastadd-mquat-solver/build.gradle
# ADD jastadd-mquat-base/build.gradle jastadd-mquat-base/build.gradle
# ADD jastadd-mquat-base/jastadd_modules jastadd-mquat-base/jastadd_modules
# ADD jastadd-mquat-solver-aco/build.gradle jastadd-mquat-solver-aco/build.gradle
# ADD jastadd-mquat-solver-emfer/build.gradle jastadd-mquat-solver-emfer/build.gradle
# ADD jastadd-mquat-solver-simple/build.gradle jastadd-mquat-solver-simple/build.gradle
# ADD jastadd-mquat-benchmark/build.gradle jastadd-mquat-benchmark/build.gradle
RUN ./gradlew --no-daemon --stacktrace build; true
RUN ./gradlew --no-daemon --stacktrace dependencies; true
# end optimization: first download

ADD . .

USER root
RUN chown user:user -R /ttc18
USER user

RUN echo "glpkPath = /usr/lib/x86_64-linux-gnu/jni" > gradle.properties
Carl Mai's avatar
Carl Mai committed
56
#RUN sed -i '/jastadd-mquat-solver-emfer/d' settings.gradle
Carl Mai's avatar
add ci  
Carl Mai committed
57
58
59
60
61
62
63
64
65
66
67
68
69
#RUN sed -i '/jastadd-mquat-solver-emfer/d' jastadd-mquat-benchmark/build.gradle
#RUN sed -i '/EMFeRSolver/d' jastadd-mquat-benchmark/src/main/java/de/tudresden/inf/st/mquat/benchmark/SolverFactory.java
RUN echo "test.enabled = false" > ./jastadd-mquat-solver-emfer/build.gradle
#RUN echo "test.enabled = false" > ./jastadd-mquat-solver-random/build.gradle
RUN sed -i 's/MINUTES/SECONDS/g' jastadd-mquat-benchmark/src/main/resources/scenarios.json

# then build
RUN ./gradlew --no-daemon assemble
RUN ./gradlew --no-daemon compileTestJava
RUN ./gradlew --no-daemon compileJava

#RUN ./gradlew test
#RUN ./gradlew benchmarkFull -Pscenario=0,small