Open saatvikshah opened 3 years ago
Hi @saatvikshah ,
A simpler solution would be to run a command identical to the one in ./quick-bench without the finale ./start-quick-bench
. Then you will be in the bench-runner container as ROOT.
You can run apt update && apt install your-favorite-editor
and edit the file run-docker
to change the line that calls docker and $BUILD_COMMAND with a bunch of parameters. You can add your own parameters here, that will be passed to the compiler. You could pass additional -v to docker, to mount directories and -l to the compiler using the newly mounted directories:
docker run --rm $ANNOTATE -v $INFILE:/home/builder/bench-file.cpp $MEMORY_LIMITS --cidfile=$CIDFILE -v $TARG_OUTFILE:/home/builder/bench.out -t fredtingaud/quick-bench:$COMPILER /bin/bash -c "./$BUILD_COMMAND $OPTIM $VERSION && $ANNOTATE_RECORD ./run $ANNOTATE_CMD"
could become something like
docker run --rm $ANNOTATE -v/path/to/3rdparty:/libraries -v $INFILE:/home/builder/bench-file.cpp $MEMORY_LIMITS --cidfile=$CIDFILE -v $TARG_OUTFILE:/home/builder/bench.out -t fredtingaud/quick-bench:$COMPILER /bin/bash -c "./$BUILD_COMMAND $OPTIM $VERSION -L/libraries -lsome-lib && $ANNOTATE_RECORD ./run $ANNOTATE_CMD"
Since
quick-bench
does not support including 3rd party libraries(like Godbolt does) via github links(https://github.com/FredTingaud/quick-bench-back-end/issues/5), I was wondering what options existed to set this up locally?Based on my understanding the way
quick-bench
works is to download the docker image from within abench-runner
image container corresponding to the compiler selected on the frontend locally by mountingdocker.sock
. So the only ways I can see to make a 3rd party library available is:ssh
into a container corresponding to the compiler I want to benchmark with(eg.fredtingaud/quick-bench:clang-10.0
), build my 3rd party dependency there and then run./quick-bench
.fredtingaud/quick-bench:clang-10.0
as a base image and haveRUN <steps to clone and build my 3rd party library>
as a command. I'll also need to set the built image name and tag appropriately.I'm curious if a simpler approach to this is possible? For example a way for the user to supply a the build step for the 3rd party library as a shell script and supported compilers to the
./quick-bench
script and it set these up. Alternately implementing support for the issue mentioned above.