Modifications on the source code within the docker container v0.9.0

I need to make some modifications on the DOLFINx C++ source code and then compile it again (v0.9.0). The fastest way to do so is with the official docker image: dolfinx/dolfinx versions · fenics · GitHub . In the container, I first pull the source code, then make modifications and recompile it with all the installed dependices. But when I executed the Python interface installation command: pip install ./dolfinx/python/ --no-build-isolation -v --upgrade, it reports the following message and the modifications were not online:

Successfully built fenics-dolfinx
Installing collected packages: fenics-dolfinx
  Attempting uninstall: fenics-dolfinx
    Found existing installation: fenics-dolfinx 0.9.0
    Not uninstalling fenics-dolfinx at /usr/local/dolfinx-real/lib/python3.12/dist-packages, outside environment /dolfinx-env
    Can't uninstall 'fenics-dolfinx'. No files were found to uninstall.
Successfully installed fenics-dolfinx-0.9.0

I found that there are two DOLFINx installation folders: /dolfinx-env and /usr/local/dolfinx-real, and I am confused with this layout. My modifications work if I delete the following folder. No idea if this is proper.
rm -rf /usr/local/dolfinx-real/lib/python3.12/dist-packages

You can see the arguments used to put DOLFINx in a specfic location in:

i.e.
use --target=/usr/local/dolfinx-real/lib/python3.12/dist-packages to replace the existing installation.