From c23a9690b5254039f2d97ac33a404ee02f975513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de> Date: Thu, 17 Dec 2020 14:29:14 +0100 Subject: [PATCH] Add Docker support for analysis notebooks --- analysis/.dockerignore | 2 ++ analysis/Dockerfile | 7 +++++++ analysis/README.md | 29 +++++++++++++++++++++++------ 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 analysis/.dockerignore create mode 100644 analysis/Dockerfile diff --git a/analysis/.dockerignore b/analysis/.dockerignore new file mode 100644 index 000000000..9a715f53b --- /dev/null +++ b/analysis/.dockerignore @@ -0,0 +1,2 @@ +.dockerignore +Dockerfile \ No newline at end of file diff --git a/analysis/Dockerfile b/analysis/Dockerfile new file mode 100644 index 000000000..1e396697f --- /dev/null +++ b/analysis/Dockerfile @@ -0,0 +1,7 @@ +FROM jupyter/base-notebook + +COPY . /home/jovyan + +WORKDIR /home/jovyan +RUN rm -r work +RUN pip install -r requirements.txt diff --git a/analysis/README.md b/analysis/README.md index 5ff8c9787..651effe91 100644 --- a/analysis/README.md +++ b/analysis/README.md @@ -9,14 +9,31 @@ benchmark execution results and plotting. The following notebooks are provided: ## Usage -For analyzing and visualizing benchmark results, a Jupyter installation with **Python 3.7** is required (e.g., in a -virtual environment). +Basically, the Theodolite Analysis Jupyter notebooks should be runnable by any Jupyter server. To make it a bit easier, +we provide introductions for running notebooks with Docker and with Visual Studio Code. These intoduction may also be +a good starting point for using another service. -We have tested these notebooks with [Visual Studio Code](https://code.visualstudio.com/docs/python/jupyter-support), -however, every other server should be fine as well. In particular, you might want to use a Jupyther Docker container. +For analyzing and visualizing benchmark results, either Docker or a Jupyter installation with Python 3.7 or newer is +required (e.g., in a virtual environment). -Our notebooks require some Python libraries, which can be installed by: +### Running with Docker + +This option requires Docker to be installed. You can build and run a container using the following commands. Make sure +to set the `results` volume to the directory with your execution results and `results-inst` to a directory where the +final scalability graphs should be placed. The output of the *run* command gives you an URL of the form +`http://127.0.0.1:8888/?token=...`, which you should open in your webbrowser. From there you can access all notebooks. ```sh -pip install -r requirements.txt +docker build . -t theodolite-analysis +docker run --rm -p 8888:8888 -v "$PWD/../results":/home/jovyan/results -v "$PWD/../results-inst":/home/jovyan/results-inst theodolite-analysis ``` + +### Running with Visual Studio Code + +The [Visual Studio Code Documentation](https://code.visualstudio.com/docs/python/jupyter-support) shows to run Jupyter +notebooks with Visual Studio Code. For our notebooks, Python 3.7 or newer is required (e.g., in a virtual environment). +Moreover, they require some Python libraries, which can be installed by: + +```sh +pip install -r requirements.txt +``` \ No newline at end of file -- GitLab