From b51c485842913560f4d4ace85703e553ad3fa6c8 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Wed, 9 Feb 2022 08:50:51 +0100 Subject: [PATCH] fix pip taking forever and add Dockerfile to simplify testing Currently the building of the pages fails with ERROR: Job failed: execution took longer than 1h0m0s seconds because of many INFO: pip is looking at multiple versions of XYZ to determine which version is compatible with other requirements. This could take a while. INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. ... A manual run on my laptop without hard time limits was not finished after 6 hours. It will now use basic Debian Python packages whereever possible and only install a dozend or so dependecies with pip. The runtime is now down again to reasonable time, as it can be tested with the added Dockerfile: podman build . --- .gitlab-ci.yml | 6 +++--- Dockerfile | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 788c99e5..e620d89c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,8 @@ -image: continuumio/miniconda3:latest +image: debian:latest before_script: -- conda install -y pyzmq -- pip install jupyter-book sphinxcontrib-bibtex +- apt-get update && apt-get install -y pip python3-sphinx jupyter-notebook python3-anyio python3-greenlet python3-click python3-jupyter-server python3-sqlalchemy python3-latexcodec python3-nbclient python3-nest-asyncio python3-pybtex python3-pybtex-docutils python3-smmap python3-soupsieve python3-toml +- pip install jupyter-book pages: stage: deploy diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..18d74d62 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:latest + +RUN apt-get update +RUN apt-get install -y pip python3-sphinx jupyter-notebook python3-anyio python3-greenlet python3-click python3-jupyter-server python3-sqlalchemy python3-latexcodec python3-nbclient python3-nest-asyncio python3-pybtex python3-pybtex-docutils python3-smmap python3-soupsieve python3-toml +RUN pip install jupyter-book + +RUN mkdir -p /root/documentation +COPY * /root/documentation +RUN cd /root/documentation && jupyter-book build . + +# TODO make build book accessible through a webserver