Cannot run Fenics code with fine mesh (memory issue?)

I tried to use the suggestion given in the first link by using mumps as a liner solver

params = {'nonlinear_solver': 'newton',
          'newton_solver':
              {
                  'linear_solver': 'mumps',
              }
          }
solver.parameters.update( params )
solver.solve()

but it does not work.
I also tried this suggestion but I could not even install pyadjoint

$  sudo pip3 install git+https://github.com/dolfin-adjoint/pyadjoint.git
WARNING: The directory '/home/fenics/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/fenics/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting git+https://github.com/dolfin-adjoint/pyadjoint.git
  Cloning https://github.com/dolfin-adjoint/pyadjoint.git to /tmp/pip-req-build-_1bxm1ih
  Running command git clone -q https://github.com/dolfin-adjoint/pyadjoint.git /tmp/pip-req-build-_1bxm1ih
Collecting scipy>=1.0
  Downloading https://files.pythonhosted.org/packages/c8/89/63171228d5ced148f5ced50305c89e8576ffc695a90b58fe5bb602b910c2/scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl (25.9MB)
     |████████████████████████████████| 25.9MB 16.0MB/s 
ERROR: Could not find a version that satisfies the requirement checkpoint_schedules (from pyadjoint-ad==2023.0.0) (from versions: none)
ERROR: No matching distribution found for checkpoint_schedules (from pyadjoint-ad==2023.0.0)

Also, using the latest Fenics version does not help either: docker run -ti -v $(pwd):/home/fenics/shared -w /home/fenics/shared/ --rm quay.io/fenicsproject/dev:latest gives, when running,

  Process 0: Newton iteration 0: r (abs) = 3.626e+02 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-09)
Traceback (most recent call last):
  File "example.py", line 206, in <module>
    solver.solve()
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to solve linear system using PETSc Krylov solver.
*** Reason:  Solution failed to converge in 0 iterations (PETSc reason DIVERGED_PC_FAILED, residual norm ||r|| = 0.000000e+00).
*** Where:   This error was encountered inside PETScKrylovSolver.cpp.
*** Process: 3
*** 
*** DOLFIN version: 2019.2.0.dev0
*** Git changeset:  f0a90b8fffc958ed612484cd3465e59994b695f9
*** -------------------------------------------------------------------------

Any suggestion ?