Build 64bit petsc and dolfinx v0.8.0

I’m tring to build dolfinx v0.8.0 with 64bit petsc inside docker, but facing some problems.

I follow this post (64-bit integer PETSc build in Dolfin-x - #6 by dokken) and modified some commands.

docker run -ti dolfinx/dolfinx:stable

# inside docker
source /usr/local/bin/dolfinx-real-mode
rm -rf /usr/local/dolfinx-real/
export PETSC_ARCH=linux-gnu-real64-64 #use one in/usr/local/petsc/
pip3 uninstall petsc4py slepc4py
pip3 install petsc4py
pip3 install slepc4py

git clone https://github.com/FEniCS/dolfinx.git
cd dolfinx
git checkout v0.8.0
cmake -G Ninja -B build-dir-real -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real -S ./cpp/
# cannot find ParMetis

cmake --build build-dir-real --parallel 8
cmake --install build-dir-real
source /usr/local/dolfinx-real/lib/dolfinx/dolfinx.conf

pip3 install ./python/ --upgrade

First problem: cmake cannot find ParMetis, does it means that I should build 64bit petsc by myself?

Second problem: after excuting the above commands, dolfinx cannot create mesh

commands to build dolfinx should be updated according to Installation — DOLFINx 0.9.0.0 documentation

# build dolfinx
git clone https://github.com/FEniCS/dolfinx.git
cd dolfinx
git checkout v0.8.0
# build cpp layer
cd cpp
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real/ ../# cannot find ParMetis, but can run in parallel
make install
source /usr/local/dolfinx-real/lib/dolfinx/dolfinx.conf
# build python layer
cd ../../python
pip3 install -r build-requirements.txt
pip3 install --check-build-dependencies --no-build-isolation .

We are not allowed to put ParMetis in a docker image: https://scicomp.ethz.ch/wiki/ParMETIS/License
so you would have to build parmetis yourself if you want to use it.
Here is a minimal docker file:

FROM ghcr.io/fenics/dolfinx/dolfinx:stable
RUN rm -rf /usr/local/dolfinx-real/
ENV PETSC_ARCH=linux-gnu-real64-64 
ENV PETSC_DIR=/usr/local/petsc
RUN python3 -m pip uninstall -y petsc4py slepc4py
RUN python3 -m pip install petsc4py
RUN python3 -m pip install slepc4py

RUN git clone --branch=v0.8.0 --single-branch https://github.com/FEniCS/dolfinx.git
RUN cmake -G Ninja -B build-dir-real -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real -S ./dolfinx/cpp/
RUN cmake --build build-dir-real --parallel 4
RUN cmake --install build-dir-real
ENV PKG_CONFIG_PATH=/usr/local/dolfinx-real/lib/pkgconfig:$PKG_CONFIG_PATH \
    PYTHONPATH=/usr/local/dolfinx-real/lib/python3.10/dist-packages:$PYTHONPATH \
    LD_LIBRARY_PATH=/usr/local/dolfinx-real/lib:$LD_LIBRARY_PATH


RUN python3 -m pip install ./dolfinx/python/ --no-build-isolation -v --upgrade


RUN python3 -c "from mpi4py import MPI; import dolfinx; print(dolfinx.__version__, dolfinx.default_scalar_type); from petsc4py import PETSc; print(PETSc.IntType)"