Hello,
I’ve tried out for the first time compiling GetFEM, since I’m interested in some new features and bugfixes of version 5.4.4 and I would also like to take this chance to learn compiling complex custom functions. I decided to proceed on Docker Desktop starting from the Dockerfile by Tetsuo Koyama but during the “docker build” execution the procedure was aborted because of the missing “setuptools” installation. This issue seems to be related to the Python version 3.12, since setuptools is no longer installed into venvs by default.
The solution was quite easy since I just had to add the “pip install setuptools” command before the GetFEM compilation and eventually the docker was built correctly.
Since it is a requirement, I would like to propose the addition of setuptools to the “getfem/requirements.txt” file by default, since is seems that the python programmers will no more add setuptools by default inside the venvs.
[(Stop installing `setuptools` and `wheel` by default on Python 3.12+ environments · Issue #2487 · pypa/virtualenv · GitHub)]
Thank you.
this was my docker file for 5.4.1. I recommend using python3-all-dev package instead of pip. In general on linux systems, the official repo is much higher quality than pip, and pip should be avoided or used only inside a venv.
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
make \
autoconf \
automake \
libblas-dev \
libmetis-dev \
libmumps-seq-dev \
libqhull-dev \
libsuperlu-dev \
libtool \
python3-all-dev \
python3-numpy \
python3-scipy \
wget \
; \
rm -rf /var/lib/apt/lists/*; \
ln -s /usr/bin/python3 /usr/bin/python; \
ln -s /usr/bin/pip3 /usr/bin/pip;
RUN wget http://git.savannah.nongnu.org/cgit/getfem.git/snapshot/getfem-5.4.1.tar.gz; \
mkdir -p /usr/src/getfem; \
tar -xzf getfem-5.4.1.tar.gz -C /usr/src/getfem --strip 1; \
rm getfem-5.4.1.tar.gz;
RUN cd /usr/src/getfem; \
./autogen.sh; \
./configure --prefix=/usr \
--enable-shared \
--with-pic \
--enable-metis \
--disable-matlab \
--disable-superlu \
--enable-mumps \
--disable-scilab \
--with-mumps="-lsmumps_seq -ldmumps_seq -lcmumps_seq -lzmumps_seq -lpord_seq" \
; \
make -j "$(nproc)"; \
make install;
regarding adding setuptools to the requirements.txt file, I think we might need to modernize our python build system
https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#modernize-setup-py-project