hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Developing and uploading a Benchmark #332

Open HamidJalali opened 6 years ago

HamidJalali commented 6 years ago

Hello,

i have a question regarding developing a benchmark. A benchmark consists of the following components: Benchmarkcontroller, Taskgenerator, Datagenerator, Evaluationstorage and Evaluationsmodule. Now the question is, do i have to to provide a docker image for every single component mentioned in order to upload it to the Gitlab to be able to use it in a experiment? Or can i provide all components in one docker image. Thank you in advance.

MichaelRoeder commented 6 years ago

In general, you can use one single docker image.

However, when you are using the code examples from the wiki, you might have to adapt your Dockerfile to be able to run different component classes (Benchmark controller, task generator, data generator, etc.) in the different situations. An example how you can achieve this can be found in our Platform Benchmark which is using only one image for all components. Its Dockerfile is using an environmental variable to decide which class should be taken: https://github.com/hobbit-project/platform-benchmark/blob/master/Dockerfile#L7 If no class is present, the class implementing the Benchmark controller is started. The controller itself sets this variable, e.g., to start a data generator https://github.com/hobbit-project/platform-benchmark/blob/master/src/main/java/org/hobbit/benchmark/platform/PlatformBenchmark.java#L58