Skip to content

Commit 5da18dc

Browse files
Switched to Alpine-based image
1 parent f362ef1 commit 5da18dc

8 files changed

Lines changed: 29 additions & 15 deletions

File tree

Dockerfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# syntax=docker/dockerfile:1
2-
FROM ubuntu:20.04
2+
FROM alpine:3.14
33

44
# Prepare the environment
5-
RUN apt-get update \
6-
&& apt-get install -y --no-install-recommends tzdata
7-
RUN apt-get install -y --no-install-recommends build-essential maven
5+
RUN apk add maven
86

97
# Build the jar files
108
WORKDIR /home/user
@@ -14,15 +12,19 @@ COPY pom.xml .
1412
RUN mvn package || exit
1513

1614

17-
FROM ubuntu:20.04
15+
FROM alpine:3.14
1816

1917
# Create a user
2018
RUN adduser --disabled-password --home /home/user --gecos '' user
2119

22-
RUN apt-get update \
23-
&& apt-get install -y --no-install-recommends build-essential openjdk-11-jdk unzip python3.8 python3-pip
20+
RUN apk add --no-cache --upgrade bash
21+
RUN apk add --update openjdk11 unzip
22+
RUN apk add --no-cache tesseract-ocr python3 py3-pip py3-numpy && \
23+
pip3 install --upgrade pip setuptools wheel && \
24+
apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py3-numpy-dev jpeg-dev && \
25+
pip3 install matplotlib && \
26+
apk del .build-deps
2427

25-
RUN python3.8 -m pip install -U matplotlib
2628
# Copy all relevant files
2729
WORKDIR /home/user
2830
RUN mkdir -p ./experimental_subjects/argouml
@@ -50,5 +52,7 @@ RUN chown user:user /home/user -R
5052
RUN chmod +x run-experiments.sh
5153
RUN chmod +x entrypoint.sh
5254

55+
RUN ls -l
56+
5357
ENTRYPOINT ["./entrypoint.sh", "./run-experiments.sh"]
5458
USER user

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ Authors:
3131
}
3232
```
3333

34+
### Contact
35+
Please contact Alexander Schultheiß if you have any questions:
36+
37+
* Discord: AlexS#1561
38+
3439
## Obtaining the Artifacts
3540
Clone the repository to a location of your choice using [git](https://git-scm.com/):
3641
```

artifact-evaluation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You can find the latest release of the package online.
77
### Zenodo
88
To obtain the artifact from Zenodo, do the following:
99

10-
* Download the package from [Zenodo](https://doi.org/10.5281/zenodo.5111532) to a location of your choice.
10+
* Download the package from Zenodo to a location of your choice.
1111
* Unpack the archive
1212
* OS with built-in ZIP support (e.g., Windows 10, Most Unix-Based OS):
1313
* `Right-click` on the zip file

artifact-evaluation/REVIEWS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ We want to thank the reviewers for their helpful and valuable feedback. We will
33
in the camera-ready submission. More complicated changes might be done in the future.
44

55
## Review 1
6-
* (FUTURE WORK) Your Dockerfile is built on top of ubuntu:20.04, but that is a pretty hefty Docker image. I wonder if you could base it on something lighter, like buster-slim, or even Alpine?
7-
* > This is a good idea and should be done for this artifact and other artifacts which we create. However, it is out of scope for the camera-ready release.
6+
* (DONE) Your Dockerfile is built on top of ubuntu:20.04, but that is a pretty hefty Docker image. I wonder if you could base it on something lighter, like buster-slim, or even Alpine?
7+
* > We based our image on Alpine:3.14.
88
* (DONE) The build-docker-image.sh script doesn't test whether you have rights to access the Docker daemon, and the README does not make clear if it should run with root privileges or not. It appears this requires a user that can use `docker` without resorting to root. I had to add my user to the Docker group, log out and back in:
99
`sudo usermod -a -G docker $(id -u)`
1010
I think it may be good to clarify this in the instructions, or test for it in the script and warn the user.
11-
* > We implemented the fix-perms solution shown in [1]
11+
* > We implemented the fix-perms solution ([1]) that should take care of this problem
1212
* (DONE) In addition, the Docker image that you are building is not redistributable, as it is tied to the UID of the user building it. Rather than that, I would suggest using the "fix-perms" approach mentioned in the "Tips and Tricks of the Docker Captains" talk [1].
1313
* > This is a really cool suggestion, as we experienced difficulties when trying to get the permissions right. We implemented the solution proposed in the talk.
1414
* (DONE) I would make a further suggestion: run the Maven build in a different Docker stage, and then copy over the generated JAR to a minimal stage. You could further reduce the size of the Docker image that way [2].
15+
* > We switched to a multi-stage build.
1516
* (DONE) The artifact includes a validation option for the scripts, which takes a shorter time and helps checking that it is functional in less time. This already took about 1.5h, so I assume that a full run can take a good while!
1617
* > We reduced the validation duration by limiting the execution to specific subset ids.
1718
* (DONE) One note - another reviewer mentioned that a few additional imports were needed in order to use RaQuN as a library. Please touch up your documentation for your final version of the artifact.
@@ -32,6 +33,7 @@ in the camera-ready submission. More complicated changes might be done in the fu
3233
* > We implemented the fix-perms solution shown in [1]
3334
* (DONE) Also, for RQ3, the indicated time was still too long even for single instance as suggested, for usual evaluation process, so smaller size of dataset had to be used. An amendment was necessary to the parameter file and the Java source code.
3435
* > We fixed the argument parsing in AbstractRQRunner that caused a problem. We reduced the validation duration by limiting the execution to specific subset ids.
35-
* (DOING) As a side note, Python script evaluation.py runs outside of the Docker environment, except for validation, so the user is responsible to make sure the Python environment is set properly (it does not happen for validation task since it runs under Docker environment).
36+
* (OPEN) As a side note, Python script evaluation.py runs outside of the Docker environment, except for validation, so the user is responsible to make sure the Python environment is set properly (it does not happen for validation task since it runs under Docker environment).
3637
For example, when the tkinter environment is not set properly, it does not plot the graph for experiments other than the validation package.
3738
A warning would be quite helpful as there was no error message with that situation.
39+
* > We were not able to reproduce this problem, as the validation is also run using the docker container and is called in line 22 of docker-resources/run-experiments.sh. Please inform us if you are experiencing this issue.

docker-resources/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
ls -l
23
if [ "$(id -u)" = "0" ]; then
34
# running on a developer laptop as root
45
fix-perms -r -u user -g user /home/user

docker-resources/run-experiments.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ "$1" == 'evaluate' ]
1919
then
2020
echo "Running result evaluation"
2121
cd result_analysis_python || exit
22-
python3.8 evaluation.py
22+
python3 evaluation.py
2323
exit
2424
else
2525
echo "Copying jars"
@@ -61,7 +61,7 @@ else
6161
java -Xmx16G -jar RQ3Runner-jar-with-dependencies.jar quick-validation.properties 3
6262
echo "Running result evaluation"
6363
cd result_analysis_python || exit
64-
python3.8 evaluation.py
64+
python3 evaluation.py
6565
else
6666
echo "Either fully run a specific experiment one time (RQ1|RQ2|RQ3), run all experiments (run), evaluate the results (evaluate), or a do quick setup validation (validate)."
6767
echo "-- Bash Examples --"

experiment.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@echo Starting %*
2+
@if not exist "results" mkdir results
23
@docker run --rm -v "%cd%/results":"/home/user/results" match-experiments %*
34

45
@pause

experiment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#! /bin/bash
22
echo "Starting $1"
3+
mkdir results
34
docker run --rm -v "$(pwd)/results":"/home/user/results" match-experiments "$@"
45

56
echo "Done."

0 commit comments

Comments
 (0)