diff --git a/Dockerfile b/Dockerfile index 2dfe2fc6..4317c474 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,13 +29,12 @@ RUN mamba install --yes \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" -# Install facets package which does not have a `pip` or `conda-forge` package at the moment -WORKDIR /tmp -RUN git clone https://github.com/cosmicrays/hermes.git -WORKDIR /tmp/hermes ENV PATH /opt/conda/bin:$PATH RUN /bin/bash -c "source activate base" -RUN mkdir build && \ +WORKDIR /tmp +RUN git clone https://github.com/cosmicrays/hermes.git && \ + cd hermes && \ + mkdir build && \ cd build && \ CMAKE_PREFIX_PATH=${CONDA_DIR} cmake \ -DPython3_EXECUTABLE=${CONDA_DIR}/bin/python${PYTHON_VERSION} \ diff --git a/INSTALL.md b/INSTALL.md index 78edb665..d89ffef0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -114,3 +114,22 @@ Finally, make the library and test executables: make -j make install ``` + +## Install with Docker/Podman image + +The simplest, yet the most inflexible method of installation and usage is with [Docker](https://www.docker.com) or [Podman](https://podman.io). One has to install Docker or Podman first on their operating system (GNU/Linux, macOS, Windows are supported). + +To build an image based on [Jupyter Docker Stacks](https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html) with HERMES installed and enabled, one has to run + +```sh +docker build -t jupyter-pyhermes . +``` + +Finally, the Jupyter notebook server is started within a new container + +```sh +docker run --name jupyter -it --rm -p 8888:8888 -v $HOME/jupyter-work:/home/jovyan/work localhost/jupyter-pyhermes:latest +``` + +where `$HOME/jupyter-work` is any directory on the host in which notebooks and files can be stored permanently, after the container is stopped and removed. It is linked to the `work` folder within the container. +