From a4b6055f8a1e4dab45131a708deec8d50714784b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 18 Aug 2020 22:24:29 +0100 Subject: Expand docker instructions to use explicitly created volume The previous instructions didn't quite seem to work anymore for me, and I'm not sure it's because of a change in docker or something else, but these new instructions seem to work. --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a2279c5b..abac174d 100644 --- a/README.md +++ b/README.md @@ -178,23 +178,34 @@ build the Docker image using: $ docker build -t alan-turing-institute/tcpdbench github.com/alan-turing-institute/TCPDBench ``` -You can then follow the same procedure as above but using the relevant docker -commands to run them in the container: +To ensure that the results created in the docker container persist to the +host, we need to create a volume first (following [these +instructions](https://stackoverflow.com/a/47528568/1154005)): + +``` +$ mkdir /path/to/tcpdbench/results # *absolute* path where you want the results +$ docker volume create --driver local \ + --opt type=none \ + --opt device=/path/to/tcpdbench/results \ + --opt o=bind tcpdbench_vol +``` + +You can then follow the same procedure as described above to reproduce the +experiments, but using the relevant docker commands to run them in the +container: * For reproducing just the tables and figures, use: ``` - $ docker run -v /absolute/path/to/TCPDBench:/TCPDBench alan-turing-institute/tcpdbench /bin/bash -c "make results" + $ docker run -i -t -v tcpdbench_vol:/TCPDBench alan-turing-institute/tcpdbench /bin/bash -c "make results" ``` -* For reproducing all the experiments: +* For reproducing all the experiments, use: ``` - $ docker run -v /absolute/path/to/TCPDBench:/TCPDBench alan-turing-institute/tcpdbench /bin/bash -c "mv abed_results old_abed_results && mkdir abed_results && abed reload_tasks && abed status && make venvs && mpiexec --allow-run-as-root -np 4 abed local && make results" + $ docker run -i -t -v tcpdbench_vol:/TCPDBench alan-turing-institute/tcpdbench /bin/bash -c "mv abed_results old_abed_results && mkdir abed_results && abed reload_tasks && abed status && make venvs && mpiexec --allow-run-as-root -np 4 abed local && make results" ``` + where ``-np 4`` sets the number of cores used for the experiments to four. + This can be changed as desired to increase efficiency. -where in both cases ``/absolute/path/to/TCPDBench`` is replaced with the path -on your machine where you want to store the files (so that results are not -lost when the docker container closes, see [docker -volumes](https://docs.docker.com/storage/volumes/)). ## Extending the Benchmark -- cgit v1.2.3