From 3a47b3af8a5aefb81b0a7f4b67917b5ffd11ec9d Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Sun, 22 Sep 2024 11:12:17 +0100 Subject: [PATCH 1/3] Fix Docker container, to use a more recent image of ubuntu Signed-off-by: Umberto Zerbinati --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 00a7ecf..1c86daf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #Setting up basic python and to be root -FROM python:3.10-slim-buster +FROM python:3.10-slim USER root #Setting up system variable ENV PETSC_DIR /root/petsc From b4442a364c8f87ea0615de3fd280da8b6b4ee7d0 Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Sun, 22 Sep 2024 11:15:42 +0100 Subject: [PATCH 2/3] Making the linter happy again, by ingoring error R0917: Too many positional arguments Signed-off-by: Umberto Zerbinati --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 31f21ab..c008fab 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ else PYLINT_FORMAT= endif lint: - pylint ${PYLINT_FORMAT} --disable=C0412,C0103,C0415,C0321,E0401,E1101,E0611,R1728,R1736,R0401,R0801,R0902,R1702,R0913,R0914,R0903,R0205,R0912,R0915,I1101,W0102,W0201,W0212,C0209 --variable-naming-style=camelCase --class-naming-style=PascalCase --argument-naming-style=camelCase --attr-naming-style=camelCase ngsPETSc - pylint ${PYLINT_FORMAT} --disable=C0412,C0103,C0415,C0321,C3001,E0401,E1101,E0611,R1728,R1736,R0401,R0801,R0902,R1702,R0913,R0914,R0903,R0205,R0912,R0915,I1101,W0102,W0201,W0212,W0406,W0212,C0209 --variable-naming-style=camelCase --class-naming-style=PascalCase --argument-naming-style=camelCase --attr-naming-style=camelCase ngsPETSc/utils + pylint ${PYLINT_FORMAT} --disable=C0412,C0103,C0415,C0321,C3001,E0401,E1101,E0611,R1728,R1736,R0401,R0801,R0902,R1702,R0913,R0914,R0903,R0205,R0912,R0915,R0917,I1101,W0102,W0201,W0212,W0406,C0209 --variable-naming-style=camelCase --class-naming-style=PascalCase --argument-naming-style=camelCase --attr-naming-style=camelCase ngsPETSc + pylint ${PYLINT_FORMAT} --disable=C0412,C0103,C0415,C0321,C3001,E0401,E1101,E0611,R1728,R1736,R0401,R0801,R0902,R1702,R0913,R0914,R0903,R0205,R0912,R0915,R0917,I1101,W0102,W0201,W0212,W0406,C0209 --variable-naming-style=camelCase --class-naming-style=PascalCase --argument-naming-style=camelCase --attr-naming-style=camelCase ngsPETSc/utils lint_test: pylint ${PYLINT_FORMAT} --disable=C0412,C0103,C0415,C0321,E0401,E1101,E0611,R1728,R1736,R0401,R0914,R0801,R0902,R1702,R0913,R0903,R0205,R0912,R0915,I1101,W0201,C0209 --variable-naming-style=camelCase --class-naming-style=PascalCase --argument-naming-style=camelCase --attr-naming-style=camelCase tests test: From 27bda1e2852333b9781d22a237e8180561f9b43e Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Tue, 24 Sep 2024 15:25:29 +0100 Subject: [PATCH 3/3] New docker container, more lightweight hopefully Signed-off-by: Umberto Zerbinati --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c86daf..196d162 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,16 +24,12 @@ RUN pip install numpy scipy cython mpi4py pytest pytest-mpi RUN cd ~ && git clone https://gitlab.com/petsc/petsc.git RUN cd ~/petsc \ && python configure --download-chaco \ - --download-cmake \ - --download-eigen \ --with-openmpi=1 \ --download-hypre \ --download-metis \ --download-parmetis \ - --download-ml \ --download-mumps \ --download-scalapack \ - --download-superlu_dist \ --with-c2html=0 \ --with-cxx-dialect=C++11 \ --with-debugging=0 \ @@ -51,6 +47,7 @@ RUN cd ~/slepc \ && make #Building ngsolve ENV LD_LIBRARY_PATH /root/petsc/linux_debug/lib +RUN pip install netgen-occt-devel netgen-occt RUN mkdir -p ~/ngsuite \ && cd ~/ngsuite \ && git clone https://github.com/NGSolve/ngsolve.git ngsolve-src \ @@ -59,7 +56,7 @@ RUN mkdir -p ~/ngsuite \ && mkdir ~/ngsuite/ngsolve-build \ && mkdir ~/ngsuite/ngsolve-install \ && cd ~/ngsuite/ngsolve-build \ - && cmake -DCMAKE_INSTALL_PREFIX=~/ngsuite/ngsolve-install ~/ngsuite/ngsolve-src -DUSE_MPI=ON -DBUILD_OCC=ON \ + && cmake -DCMAKE_INSTALL_PREFIX=~/ngsuite/ngsolve-install ~/ngsuite/ngsolve-src -DUSE_MPI=ON -DBUILD_OCC=OFF\ && make && make install #Adding NGS to PYTHONPATH ENV PYTHONPATH /root/petsc/linux_debug/lib:/root/slepc/linux_debug/lib:/root/ngsuite/ngsolve-install/lib/python3.10/site-packages