Saving files & library in fenicsx environment

Hello,
I have trouble in saving files and installing library in fenicsx environment.
I activate fenicsx enviroment with command :

conda activate fenics-env

and run with jupyter :

sudo docker run --init -ti -p 8888:8888 dolfinx/lab:stable

However, when I see the file directory, it is vacant, unlike to the jupyter ran by normal environment :


(The two files are uploaded after restarting jupyter, so there was none at the very start)

When I restart the jupyter, every file stored in jupyter path is gone. For this case, the two files in the figure would be gone even though I save them, as shown in the figure.
Additionally, although I install some libraries in fenicsx environment, which means installation after typing the command

conda activate fenics-env

Jupyter cannot recognize the installed library. However, libraries such as dolfinx, ufl is recognized.

How can I solve this issue?
Thanks for reading.

You are here mixing two different ways of using DOLFINx:

  1. Using conda; This creates a virtual environment on your computer. If you install jupyterlab in conda, you can use it without having to consider sharing files (as you are on your own system).
  2. Using docker. Docker creates a virtual machine, which has its own file system, and you would have to share directories (mount volumes in docker-lingo) to being able to save them. Also, as you do not give your docker container a name when you start it, you start a new virtual machine every time you call this command.

To use docker I would run something like

docker run -ti  -v $(pwd):/root/shared -w /root/shared --name=dolfinx_stable  dolfinx/lab:v0.6.0-r1

which can be restarted again with docker container start -i dolfinx_stable, and shares the current directory (The directory you run the docker run ... command from) with the docker container.

1 Like

Thanks for reply Dokken, now it works! I was confused of two ways :sweat_smile:

Hello Dokken, I think I missed some points. Sorry for re-asking.

1) For the method of using docker, I could run the command you suggested successfully,

docker run -ti  -v $(pwd):/root/shared -w /root/shared --name=dolfinx_stable  dolfinx/lab:v0.6.0-r1

but I couldn’t access with such message :

I just followed the link from terminal :

(base) yidongzhao@GeoSMART-GPU1:~$ sudo docker container start -i dolfinx_stable
[I 2023-05-04 18:02:35.280 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-05-04 18:02:35.285 ServerApp] Package jupyter_server_terminals took 0.0045s to import
[I 2023-05-04 18:02:35.431 ServerApp] Package jupytext took 0.1460s to import
[I 2023-05-04 18:02:35.432 ServerApp] Package nbclassic took 0.0000s to import
[W 2023-05-04 18:02:35.434 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-04 18:02:35.434 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-05-04 18:02:35.434 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-04 18:02:35.439 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-05-04 18:02:35.445 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-05-04 18:02:35.445 ServerApp] jupytext | extension was successfully linked.
[I 2023-05-04 18:02:35.449 ServerApp] nbclassic | extension was successfully linked.
[I 2023-05-04 18:02:35.674 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-05-04 18:02:35.695 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-05-04 18:02:35.696 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-05-04 18:02:35.696 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.10/dist-packages/jupyterlab
[I 2023-05-04 18:02:35.696 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2023-05-04 18:02:35.700 ServerApp] jupyterlab | extension was successfully loaded.
[W 2023-05-04 18:02:35.700 ServerApp] [Jupytext Server Extension] Async contents managers like AsyncLargeFileManager are not supported at the moment (https://github.com/mwouts/jupytext/issues/1020). We will derive a contents manager from LargeFileManager instead.
[I 2023-05-04 18:02:35.700 ServerApp] [Jupytext Server Extension] Deriving a JupytextContentsManager from LargeFileManager
[I 2023-05-04 18:02:35.701 ServerApp] jupytext | extension was successfully loaded.
[I 2023-05-04 18:02:35.704 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-05-04 18:02:35.704 ServerApp] Serving notebooks from local directory: /root/shared
[I 2023-05-04 18:02:35.704 ServerApp] Jupyter Server 2.2.0 is running at:
[I 2023-05-04 18:02:35.704 ServerApp] http://be6fa68083c0:8888/lab?token=7c256512f6e725f5b77ee271682de50e3b9dc6ac7823e350
[I 2023-05-04 18:02:35.704 ServerApp]  or http://127.0.0.1:8888/lab?token=7c256512f6e725f5b77ee271682de50e3b9dc6ac7823e350
[I 2023-05-04 18:02:35.705 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-05-04 18:02:35.708 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/jpserver-1-open.html
    Or copy and paste one of these URLs:
        http://be6fa68083c0:8888/lab?token=7c256512f6e725f5b77ee271682de50e3b9dc6ac7823e350
     or http://127.0.0.1:8888/lab?token=7c256512f6e725f5b77ee271682de50e3b9dc6ac7823e350

2) Also, for conda way, I thought it worked, but found that some libraries such as petsc4py could not be recognized.
How I opened jupyter notebook is as follows :

conda activate fenics-env
jupyter notebook

By doing this, I could check the local directory, as you explained. However in the notebook petsc4py was not installed. So, I tried to install petsc4py but couldn’t be done with message that cannot be installed :

Collecting petsc4py
  Using cached petsc4py-3.19.1.tar.gz (292 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /home/yidongzhao/anaconda3/lib/python3.9/site-packages (from petsc4py) (1.21.5)
Collecting petsc<3.20,>=3.19 (from petsc4py)
  Using cached petsc-3.19.1.tar.gz (16.7 MB)
  Preparing metadata (setup.py) ... done
Collecting mpi4py>=1.2.2 (from petsc<3.20,>=3.19->petsc4py)
  Using cached mpi4py-3.1.4.tar.gz (2.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: petsc4py, petsc, mpi4py
  Building wheel for petsc4py (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      running bdist_wheel
      PETSC_DIR not specified
      running build
      running build_src
      removing Cython 0.29.28 from sys.modules
      fetching build requirement 'Cython >= 0.29.32'
      using Cython 0.29.34
      cythonizing 'petsc4py/PETSc.pyx' -> 'petsc4py/PETSc.c'
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/petsc4py
      copying src/petsc4py/__init__.py -> build/lib.linux-x86_64-cpython-39/petsc4py
      copying src/petsc4py/PETSc.py -> build/lib.linux-x86_64-cpython-39/petsc4py
      copying src/petsc4py/__main__.py -> build/lib.linux-x86_64-cpython-39/petsc4py
      creating build/lib.linux-x86_64-cpython-39/petsc4py/lib
      copying src/petsc4py/lib/__init__.py -> build/lib.linux-x86_64-cpython-39/petsc4py/lib
      copying src/petsc4py/PETSc.pxd -> build/lib.linux-x86_64-cpython-39/petsc4py
      copying src/petsc4py/PETSc.h -> build/lib.linux-x86_64-cpython-39/petsc4py
      copying src/petsc4py/PETSc_api.h -> build/lib.linux-x86_64-cpython-39/petsc4py
      creating build/lib.linux-x86_64-cpython-39/petsc4py/include
      creating build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/include/petsc4py/pybuffer.h -> build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/include/petsc4py/pyscalar.h -> build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/include/petsc4py/numpy.h -> build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/include/petsc4py/petsc4py.h -> build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/include/petsc4py/petsc4py.i -> build/lib.linux-x86_64-cpython-39/petsc4py/include/petsc4py
      copying src/petsc4py/lib/petsc.cfg -> build/lib.linux-x86_64-cpython-39/petsc4py/lib
      running build_ext
      error: PETSc not found
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for petsc4py
  Running setup.py clean for petsc4py
  Building wheel for petsc (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      petsc: this package cannot be built as a wheel
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for petsc
  Running setup.py clean for petsc
  Building wheel for mpi4py (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for mpi4py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [156 lines of output]
      running bdist_wheel
      running build
      running build_src
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/__init__.py -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/bench.py -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/run.py -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/__main__.py -> build/lib.linux-x86_64-cpython-39/mpi4py
      creating build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/__init__.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/_lib.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/_core.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/pool.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/_base.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/__main__.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/server.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/aplus.py -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      creating build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/util/__init__.py -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/util/pkl5.py -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/util/dtlib.py -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/py.typed -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/__main__.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/bench.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/dl.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/run.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/__init__.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/MPI.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/libmpi.pxd -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/__init__.pxd -> build/lib.linux-x86_64-cpython-39/mpi4py
      copying src/mpi4py/MPI.pxd -> build/lib.linux-x86_64-cpython-39/mpi4py
      creating build/lib.linux-x86_64-cpython-39/mpi4py/include
      creating build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.MPI.h -> build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.MPI_api.h -> build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.h -> build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi4py.i -> build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/include/mpi4py/mpi.pxi -> build/lib.linux-x86_64-cpython-39/mpi4py/include/mpi4py
      copying src/mpi4py/futures/server.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/__main__.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/aplus.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/_lib.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/__init__.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/pool.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/futures/_core.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/futures
      copying src/mpi4py/util/dtlib.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/util/pkl5.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      copying src/mpi4py/util/__init__.pyi -> build/lib.linux-x86_64-cpython-39/mpi4py/util
      running build_clib
      MPI configuration: [mpi] from 'mpi.cfg'
      MPI C compiler:    /home/yidongzhao/anaconda3/bin/mpicc
      MPI C++ compiler:  /home/yidongzhao/anaconda3/bin/mpicxx
      MPI F compiler:    /home/yidongzhao/anaconda3/bin/mpifort
      MPI F90 compiler:  /home/yidongzhao/anaconda3/bin/mpif90
      MPI F77 compiler:  /home/yidongzhao/anaconda3/bin/mpif77
      checking for library 'lmpe' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      building 'mpe' dylib library
      creating build/temp.linux-x86_64-cpython-39
      creating build/temp.linux-x86_64-cpython-39/src
      creating build/temp.linux-x86_64-cpython-39/src/lib-pmpi
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c src/lib-pmpi/mpe.c -o build/temp.linux-x86_64-cpython-39/src/lib-pmpi/mpe.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      warning: build_clib: command '/home/yidongzhao/anaconda3/bin/mpicc' failed with exit code 127
      
      warning: build_clib: building optional library "mpe" failed
      
      checking for library 'vt-mpi' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      checking for library 'vt.mpi' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      building 'vt' dylib library
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c src/lib-pmpi/vt.c -o build/temp.linux-x86_64-cpython-39/src/lib-pmpi/vt.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      warning: build_clib: command '/home/yidongzhao/anaconda3/bin/mpicc' failed with exit code 127
      
      warning: build_clib: building optional library "vt" failed
      
      checking for library 'vt-mpi' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      checking for library 'vt.mpi' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      building 'vt-mpi' dylib library
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c src/lib-pmpi/vt-mpi.c -o build/temp.linux-x86_64-cpython-39/src/lib-pmpi/vt-mpi.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      warning: build_clib: command '/home/yidongzhao/anaconda3/bin/mpicc' failed with exit code 127
      
      warning: build_clib: building optional library "vt-mpi" failed
      
      checking for library 'vt-hyb' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      checking for library 'vt.ompi' ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      building 'vt-hyb' dylib library
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -c src/lib-pmpi/vt-hyb.c -o build/temp.linux-x86_64-cpython-39/src/lib-pmpi/vt-hyb.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      warning: build_clib: command '/home/yidongzhao/anaconda3/bin/mpicc' failed with exit code 127
      
      warning: build_clib: building optional library "vt-hyb" failed
      
      running build_ext
      MPI configuration: [mpi] from 'mpi.cfg'
      MPI C compiler:    /home/yidongzhao/anaconda3/bin/mpicc
      MPI C++ compiler:  /home/yidongzhao/anaconda3/bin/mpicxx
      MPI F compiler:    /home/yidongzhao/anaconda3/bin/mpifort
      MPI F90 compiler:  /home/yidongzhao/anaconda3/bin/mpif90
      MPI F77 compiler:  /home/yidongzhao/anaconda3/bin/mpif77
      checking for dlopen() availability ...
      checking for header 'dlfcn.h' ...
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -I/home/yidongzhao/anaconda3/include/python3.9 -c _configtest.c -o _configtest.o
      success!
      removing: _configtest.c _configtest.o
      success!
      checking for library 'dl' ...
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -I/home/yidongzhao/anaconda3/include/python3.9 -c _configtest.c -o _configtest.o
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat _configtest.o -Lbuild/temp.linux-x86_64-cpython-39 -ldl -o _configtest
      success!
      removing: _configtest.c _configtest.o _configtest
      checking for function 'dlopen' ...
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -I/home/yidongzhao/anaconda3/include/python3.9 -c _configtest.c -o _configtest.o
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat _configtest.o -Lbuild/temp.linux-x86_64-cpython-39 -ldl -o _configtest
      success!
      removing: _configtest.c _configtest.o _configtest
      building 'mpi4py.dl' extension
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -DHAVE_DLFCN_H=1 -DHAVE_DLOPEN=1 -I/home/yidongzhao/anaconda3/include/python3.9 -c src/dynload.c -o build/temp.linux-x86_64-cpython-39/src/dynload.o
      gcc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -shared -Wl,-rpath,/home/yidongzhao/anaconda3/lib -Wl,-rpath-link,/home/yidongzhao/anaconda3/lib -L/home/yidongzhao/anaconda3/lib -L/home/yidongzhao/anaconda3/lib -Wl,-rpath,/home/yidongzhao/anaconda3/lib -Wl,-rpath-link,/home/yidongzhao/anaconda3/lib -L/home/yidongzhao/anaconda3/lib build/temp.linux-x86_64-cpython-39/src/dynload.o -Lbuild/temp.linux-x86_64-cpython-39 -ldl -o build/lib.linux-x86_64-cpython-39/mpi4py/dl.cpython-39-x86_64-linux-gnu.so
      checking for MPI compile and link ...
      /home/yidongzhao/anaconda3/bin/mpicc -pthread -B /home/yidongzhao/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -I/home/yidongzhao/anaconda3/include -fPIC -O2 -isystem /home/yidongzhao/anaconda3/include -fPIC -I/home/yidongzhao/anaconda3/include/python3.9 -c _configtest.c -o _configtest.o
      /home/yidongzhao/anaconda3/bin/mpicc: line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
      failure.
      removing: _configtest.c _configtest.o
      error: Cannot compile MPI programs. Check your configuration!!!
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mpi4py
Failed to build petsc4py petsc mpi4py
ERROR: Could not build wheels for petsc4py, petsc, mpi4py, which is required to install pyproject.toml-based projects
Note: you may need to restart the kernel to use updated packages.

Could you give me some comments on these?

Always thanks.

Add some port forwarding, usually -p 8888:8888 should work.

After you have activated the fenics-env, what does conda list yield?

Hello, thanks for the comment.

  1. I followed your port forwarding,
(base) yidongzhao@GeoSMART-GPU1:~$ sudo docker run -ti -v $(pwd):/root/shared -w /root/shared --name=dolfinx dolfinx/lab:v0.6.0-r1 -p 8888:8888
[W 2023-05-05 06:00:45.825 ServerApp] Unrecognized alias: 'p', it will have no effect.
[I 2023-05-05 06:00:45.833 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-05-05 06:00:45.838 ServerApp] Package jupyter_server_terminals took 0.0046s to import
[I 2023-05-05 06:00:45.979 ServerApp] Package jupytext took 0.1403s to import
[I 2023-05-05 06:00:45.979 ServerApp] Package nbclassic took 0.0000s to import
[W 2023-05-05 06:00:45.981 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-05 06:00:45.981 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-05-05 06:00:45.981 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-05-05 06:00:45.986 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-05-05 06:00:45.991 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-05-05 06:00:45.991 ServerApp] jupytext | extension was successfully linked.
[I 2023-05-05 06:00:45.995 ServerApp] nbclassic | extension was successfully linked.
[I 2023-05-05 06:00:45.996 ServerApp] Writing Jupyter server cookie secret to /root/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-05-05 06:00:46.225 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-05-05 06:00:46.246 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-05-05 06:00:46.247 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-05-05 06:00:46.248 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.10/dist-packages/jupyterlab
[I 2023-05-05 06:00:46.248 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2023-05-05 06:00:46.251 ServerApp] jupyterlab | extension was successfully loaded.
[W 2023-05-05 06:00:46.251 ServerApp] [Jupytext Server Extension] Async contents managers like AsyncLargeFileManager are not supported at the moment (https://github.com/mwouts/jupytext/issues/1020). We will derive a contents manager from LargeFileManager instead.
[I 2023-05-05 06:00:46.251 ServerApp] [Jupytext Server Extension] Deriving a JupytextContentsManager from LargeFileManager
[I 2023-05-05 06:00:46.253 ServerApp] jupytext | extension was successfully loaded.
[I 2023-05-05 06:00:46.256 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-05-05 06:00:46.256 ServerApp] Serving notebooks from local directory: /root/shared
[I 2023-05-05 06:00:46.256 ServerApp] Jupyter Server 2.2.0 is running at:
[I 2023-05-05 06:00:46.256 ServerApp] http://faf1f8cec289:8888/lab?token=5aacad4ddb2b2c0d9dd9e7e3463da26298f027ab58e714d1
[I 2023-05-05 06:00:46.256 ServerApp]  or http://127.0.0.1:8888/lab?token=5aacad4ddb2b2c0d9dd9e7e3463da26298f027ab58e714d1
[I 2023-05-05 06:00:46.256 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-05-05 06:00:46.259 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/jpserver-1-open.html
    Or copy and paste one of these URLs:
        http://faf1f8cec289:8888/lab?token=5aacad4ddb2b2c0d9dd9e7e3463da26298f027ab58e714d1
     or http://127.0.0.1:8888/lab?token=5aacad4ddb2b2c0d9dd9e7e3463da26298f027ab58e714d1

Again the site could not be reached. Am I using port forwarding in a wrong way?

The ridiculous point is that I could access the link successfully when I used (restarting every time) :

sudo docker run --init -ti -p 8888:8888 dolfinx/lab:stable

with such message :

(base) yidongzhao@GeoSMART-GPU1:~$ sudo docker run --init -ti -p 8888:8888 dolfinx/lab:stable
[sudo] password for yidongzhao: 
[I 2023-05-05 06:30:23.626 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-05-05 06:30:23.631 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-05-05 06:30:23.631 ServerApp] jupytext | extension was successfully linked.
[I 2023-05-05 06:30:23.635 ServerApp] nbclassic | extension was successfully linked.
[I 2023-05-05 06:30:23.636 ServerApp] Writing Jupyter server cookie secret to /root/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-05-05 06:30:23.859 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-05-05 06:30:23.878 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-05-05 06:30:23.879 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-05-05 06:30:23.880 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.10/dist-packages/jupyterlab
[I 2023-05-05 06:30:23.880 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2023-05-05 06:30:23.883 ServerApp] jupyterlab | extension was successfully loaded.
[W 2023-05-05 06:30:23.883 ServerApp] [Jupytext Server Extension] Async contents managers like AsyncLargeFileManager are not supported at the moment (https://github.com/mwouts/jupytext/issues/1020). We will derive a contents manager from LargeFileManager instead.
[I 2023-05-05 06:30:23.883 ServerApp] [Jupytext Server Extension] Deriving a JupytextContentsManager from LargeFileManager
[I 2023-05-05 06:30:23.885 ServerApp] jupytext | extension was successfully loaded.
[I 2023-05-05 06:30:23.888 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-05-05 06:30:23.888 ServerApp] Serving notebooks from local directory: /root
[I 2023-05-05 06:30:23.888 ServerApp] Jupyter Server 2.1.0 is running at:
[I 2023-05-05 06:30:23.888 ServerApp] http://67b8c1b19509:8888/lab?token=eabee94bbc6e770f1bbb2e7aa3063ddd765c71f7b6bf9e1c
[I 2023-05-05 06:30:23.888 ServerApp]  or http://127.0.0.1:8888/lab?token=eabee94bbc6e770f1bbb2e7aa3063ddd765c71f7b6bf9e1c
[I 2023-05-05 06:30:23.888 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
  1. Thanks to your comment, I did conda install petsc4py so now it works, However, another error occurred:
AttributeError                            Traceback (most recent call last)
Cell In[1], line 8
      5 from petsc4py import PETSc
      7 import gmsh
----> 8 from dolfinx import fem, mesh, io, plot
      9 from dolfinx.fem import (Constant, dirichletbc, Function, FunctionSpace, assemble_scalar,
     10                          form, locate_dofs_geometrical, locate_dofs_topological, DofMap)
     11 from dolfinx.fem.petsc import LinearProblem

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/__init__.py:31
     29 from dolfinx import common
     30 from dolfinx import cpp as _cpp
---> 31 from dolfinx import fem, geometry, graph, io, jit, la, log, mesh, nls, plot
     32 # Initialise logging
     33 from dolfinx.common import (TimingType, git_commit_hash, has_debug, has_kahip,
     34                             has_parmetis, list_timings, timing)

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/fem/__init__.py:11
      9 from dolfinx.cpp.fem import IntegralType
     10 from dolfinx.cpp.fem import create_sparsity_pattern as _create_sparsity_pattern
---> 11 from dolfinx.fem import petsc
     12 from dolfinx.fem.assemble import (apply_lifting, assemble_matrix,
     13                                   assemble_scalar, assemble_vector, set_bc)
     14 from dolfinx.fem.bcs import (DirichletBCMetaClass, bcs_by_block, dirichletbc,
     15                              locate_dofs_geometrical, locate_dofs_topological)

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/fem/petsc.py:25
     23 from dolfinx.cpp.fem import pack_coefficients as _pack_coefficients
     24 from dolfinx.cpp.fem import pack_constants as _pack_constants
---> 25 from dolfinx.fem import assemble
     26 from dolfinx.fem.bcs import DirichletBCMetaClass
     27 from dolfinx.fem.bcs import bcs_by_block as _bcs_by_block

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/fem/assemble.py:22
     20 from dolfinx.cpp.fem import pack_constants as _pack_constants
     21 from dolfinx.fem.bcs import DirichletBCMetaClass
---> 22 from dolfinx.fem.forms import FormMetaClass, form_types
     25 def pack_constants(form: typing.Union[FormMetaClass,
     26                                       typing.Sequence[FormMetaClass]]) -> typing.Union[np.ndarray,
     27                                                                                        typing.Sequence[np.ndarray]]:
     28     """Compute form constants.
     29 
     30     Pack the `constants` that appear in forms. The packed constants can
   (...)
     43 
     44     """

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/fem/forms.py:13
     10 import collections.abc
     11 import typing
---> 13 from dolfinx.fem.function import FunctionSpace
     15 if typing.TYPE_CHECKING:
     16     from dolfinx.fem import function

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/dolfinx/fem/function.py:23
     20 from petsc4py import PETSc
     22 import basix
---> 23 import basix.ufl_wrapper
     24 import ufl
     25 import ufl.algorithms

File ~/anaconda3/envs/fenics-env/lib/python3.10/site-packages/basix/ufl_wrapper.py:27
     18 from ufl.algorithms.estimate_degrees import IrreducibleInt as _IrreducibleInt
     20 _nda_f64 = _numpy_typing.NDArray[_numpy.float64]
     23 _spacemap = {
     24     _basix.SobolevSpace.L2: _ufl.sobolevspace.L2,
     25     _basix.SobolevSpace.H1: _ufl.sobolevspace.H1,
     26     _basix.SobolevSpace.H2: _ufl.sobolevspace.H2,
---> 27     _basix.SobolevSpace.HInf: _ufl.sobolevspace.HInf,
     28     _basix.SobolevSpace.HDiv: _ufl.sobolevspace.HDiv,
     29     _basix.SobolevSpace.HCurl: _ufl.sobolevspace.HCurl,
     30     _basix.SobolevSpace.HEin: _ufl.sobolevspace.HEin,
     31     _basix.SobolevSpace.HDivDiv: _ufl.sobolevspace.HDivDiv,
     32 }
     35 def ufl_sobolev_space_from_enum(s: _basix.SobolevSpace):
     36     """Convert a Basix Sobolev space enum to a UFL Sobolev space.
     37 
     38     Args:
   (...)
     42         UFL Sobolev space
     43     """

AttributeError: module 'ufl.sobolevspace' has no attribute 'HInf'

To be more helpful to solve the issue , here I attached my conda list in fenics-env :

(fenics-env) yidongzhao@GeoSMART-GPU1:~/anaconda3/bin$ conda list
# packages in environment at /home/yidongzhao/anaconda3/envs/fenics-env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
aiohttp                   3.8.4           py310h1fa729e_0    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
alsa-lib                  1.2.8                h166bdaf_0    conda-forge
anyio                     3.6.2                    pypi_0    pypi
aom                       3.5.0                h27087fc_0    conda-forge
argon2-cffi               21.3.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
arrow                     1.2.3                    pypi_0    pypi
asttokens                 2.2.1                    pypi_0    pypi
async-timeout             4.0.2              pyhd8ed1ab_0    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
attrs                     22.2.0             pyh71513ae_0    conda-forge
backcall                  0.2.0                    pypi_0    pypi
beautifulsoup4            4.12.2                   pypi_0    pypi
binutils_impl_linux-64    2.39                 he00db2b_1    conda-forge
binutils_linux-64         2.39                h5fc0e48_12    conda-forge
blas                      1.0                    openblas  
bleach                    6.0.0                    pypi_0    pypi
blosc                     1.21.3               hafa529b_0    conda-forge
boost-cpp                 1.78.0               h6582d0a_3    conda-forge
brotli                    1.0.9                h166bdaf_8    conda-forge
brotli-bin                1.0.9                h166bdaf_8    conda-forge
brotlipy                  0.7.0           py310h5764c6d_1005    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2022.12.7            ha878542_0    conda-forge
cairo                     1.16.0            h35add3b_1015    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h255011f_3    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
comm                      0.1.3                    pypi_0    pypi
contourpy                 1.0.7           py310hdf3cbec_0    conda-forge
cryptography              40.0.2          py310h34c0648_0    conda-forge
curl                      8.0.1                h588be90_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
debugpy                   1.6.7                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
double-conversion         3.2.0                h27087fc_1    conda-forge
eigen                     3.4.0                h4bd325d_0    conda-forge
emcee                     3.1.4                    pypi_0    pypi
executing                 1.2.0                    pypi_0    pypi
expat                     2.5.0                hcb278e6_1    conda-forge
fastjsonschema            2.16.3                   pypi_0    pypi
fenics-basix              0.6.0           py310hdf3cbec_0    conda-forge
fenics-dolfinx            0.6.0           py310hf97048e_101    conda-forge
fenics-ffcx               0.6.0              pyh56297ac_0    conda-forge
fenics-libbasix           0.6.0                h1284905_0    conda-forge
fenics-libdolfinx         0.6.0              h4cb9d57_101    conda-forge
fenics-ufcx               0.6.0                h56297ac_0    conda-forge
fenics-ufl                2023.1.1           pyhd8ed1ab_1    conda-forge
ffmpeg                    5.1.2           gpl_h8dda1f0_106    conda-forge
fftw                      3.3.10          mpi_mpich_h5537406_7    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.39.3          py310h1fa729e_0    conda-forge
fqdn                      1.5.1                    pypi_0    pypi
freetype                  2.12.1               hca18f0e_1    conda-forge
frozenlist                1.3.3           py310h5764c6d_0    conda-forge
gcc_impl_linux-64         12.2.0              hcc96c02_19    conda-forge
gcc_linux-64              12.2.0              h4798a0e_12    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
gl2ps                     1.4.2                h0708190_0    conda-forge
glew                      2.1.0                h9c3ff4c_2    conda-forge
glib                      2.76.1               h3eb15da_0    conda-forge
glib-tools                2.76.1               h3eb15da_0    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmsh                      4.11.1                   pypi_0    pypi
gnutls                    3.7.8                hf3e180e_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gst-plugins-base          1.22.0               h4243ec0_2    conda-forge
gstools                   1.4.1                    pypi_0    pypi
gstreamer                 1.22.0               h25f0c4b_2    conda-forge
gxx_impl_linux-64         12.2.0              hcc96c02_19    conda-forge
gxx_linux-64              12.2.0              hb41e900_12    conda-forge
hankel                    1.2.1                    pypi_0    pypi
harfbuzz                  6.0.0                h3ff4399_1    conda-forge
hdf4                      4.2.15               h501b40f_6    conda-forge
hdf5                      1.12.2          mpi_mpich_h5d83325_1    conda-forge
hypre                     2.25.0          mpi_mpich_hed3a557_0    conda-forge
icu                       72.1                 hcb278e6_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imageio                   2.27.0             pyh24c5eb1_0    conda-forge
ipycanvas                 0.13.1                   pypi_0    pypi
ipydatawidgets            4.3.3                    pypi_0    pypi
ipyevents                 2.0.1                    pypi_0    pypi
ipygany                   0.5.0                    pypi_0    pypi
ipykernel                 6.22.0                   pypi_0    pypi
ipython                   8.12.0                   pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
ipyvtklink                0.2.3                    pypi_0    pypi
ipywidgets                7.7.5                    pypi_0    pypi
isoduration               20.11.0                  pypi_0    pypi
jax                       0.4.8                    pypi_0    pypi
jaxlib                    0.4.7+cuda12.cudnn88          pypi_0    pypi
jedi                      0.18.2                   pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
jsoncpp                   1.9.5                h4bd325d_1    conda-forge
jsonpointer               2.3                      pypi_0    pypi
jsonschema                4.17.3                   pypi_0    pypi
jupyter-client            8.2.0                    pypi_0    pypi
jupyter-core              5.3.0                    pypi_0    pypi
jupyter-events            0.6.3                    pypi_0    pypi
jupyter-server            2.5.0                    pypi_0    pypi
jupyter-server-terminals  0.4.4                    pypi_0    pypi
jupyterlab-pygments       0.2.2                    pypi_0    pypi
jupyterlab-widgets        1.1.4                    pypi_0    pypi
kernel-headers_linux-64   2.6.32              he073ed8_15    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.4           py310hbf28c38_1    conda-forge
krb5                      1.20.1               h81ceb04_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
lcms2                     2.15                 haa2dc70_1    conda-forge
...
libzlib                   1.2.13               h166bdaf_4    conda-forge
loguru                    0.7.0           py310hff52083_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
markdown-it-py            2.2.0                    pypi_0    pypi
markupsafe                2.1.2                    pypi_0    pypi
matplotlib                3.7.1           py310hff52083_0    conda-forge
matplotlib-base           3.7.1           py310he60537e_0    conda-forge
matplotlib-inline         0.1.6                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
meshio                    5.3.4                    pypi_0    pypi
metis                     5.1.0             h58526e2_1006    conda-forge
mistune                   2.0.5                    pypi_0    pypi
ml-dtypes                 0.1.0                    pypi_0    pypi
mpfr                      4.2.0                hb012696_0    conda-forge
mpg123                    1.31.3               hcb278e6_0    conda-forge
mpi                       1.0                       mpich    conda-forge
mpi4py                    3.1.4           py310h37cc914_0    conda-forge
mpich                     4.0.3              h846660c_100    conda-forge
mpmath                    1.3.0                    pypi_0    pypi
multidict                 6.0.4           py310h1fa729e_0    conda-forge
mumps-include             5.2.1               ha770c72_11    conda-forge
mumps-mpi                 5.2.1               h7ee95aa_11    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.0.32               ha901b37_1    conda-forge
mysql-libs                8.0.32               hd7da12d_1    conda-forge
nbclassic                 0.5.5                    pypi_0    pypi
nbclient                  0.7.3                    pypi_0    pypi
nbconvert                 7.3.1                    pypi_0    pypi
nbformat                  5.8.0                    pypi_0    pypi
ncurses                   6.3                  h27087fc_1    conda-forge
nest-asyncio              1.5.6                    pypi_0    pypi
nettle                    3.8.1                hc379101_1    conda-forge
nlohmann_json             3.11.2               h27087fc_0    conda-forge
notebook                  6.5.4                    pypi_0    pypi
notebook-shim             0.2.2                    pypi_0    pypi
nspr                      4.35                 h27087fc_0    conda-forge
nss                       3.89                 he45b914_0    conda-forge
numpy                     1.24.2          py310h8deb116_0    conda-forge
openh264                  2.3.1                hcb278e6_2    conda-forge
openjpeg                  2.5.0                hfec8fc6_2    conda-forge
openssl                   3.1.0                hd590300_3    conda-forge
opt_einsum                3.3.0              pyhd3eb1b0_1  
p11-kit                   0.24.1               hc5aa10d_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pandas                    2.0.1                    pypi_0    pypi
pandocfilters             1.5.0                    pypi_0    pypi
parmetis                  4.0.3             h2a9763c_1005    conda-forge
parso                     0.8.3                    pypi_0    pypi
pcre2                     10.40                hc3806b6_0    conda-forge
petsc                     3.17.4          real_h15390b8_101    conda-forge
petsc4py                  3.17.4          real_hce8fbc3_101    conda-forge
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    9.5.0           py310h065c6d2_0    conda-forge
pip                       23.1.2                   pypi_0    pypi
pixman                    0.40.0               h36c2ea0_0    conda-forge
platformdirs              3.2.0              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
proj                      9.1.1                h8ffa02c_2    conda-forge
prometheus-client         0.16.0                   pypi_0    pypi
prompt-toolkit            3.0.38                   pypi_0    pypi
psutil                    5.9.5                    pypi_0    pypi
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptscotch                  6.0.9                hb499603_2    conda-forge
ptyprocess                0.7.0                    pypi_0    pypi
pugixml                   1.11.4               h9c3ff4c_0    conda-forge
pulseaudio-client         16.1                 h5195f5e_3    conda-forge
pure-eval                 0.2.2                    pypi_0    pypi
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyevtk                    1.5.0                    pypi_0    pypi
pygments                  2.15.1                   pypi_0    pypi
pyopenssl                 23.1.1             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.7          py310hab646b1_3    conda-forge
pyqt5-sip                 12.11.0         py310heca2aa9_3    conda-forge
pyrsistent                0.19.3                   pypi_0    pypi
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.10         he550d4f_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7                    pypi_0    pypi
python_abi                3.10                    3_cp310    conda-forge
pythreejs                 2.4.2                    pypi_0    pypi
pytz                      2023.3                   pypi_0    pypi
pyvista                   0.38.6             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0                      pypi_0    pypi
pyzmq                     25.0.2                   pypi_0    pypi
qt-main                   5.15.8               h5c52f38_9    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.28.2             pyhd8ed1ab_1    conda-forge
rfc3339-validator         0.1.4                    pypi_0    pypi
rfc3986-validator         0.1.1                    pypi_0    pypi
rich                      13.3.5                   pypi_0    pypi
scalapack                 2.2.0                hd931219_1    conda-forge
scipy                     1.10.1          py310heeff2f4_0  
scooby                    0.7.1              pyhd8ed1ab_0    conda-forge
scotch                    6.0.9                hb2e6521_2    conda-forge
send2trash                1.8.0                    pypi_0    pypi
setuptools                67.7.1             pyhd8ed1ab_0    conda-forge
sip                       6.7.9           py310hc6cd4ac_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
slepc                     3.17.2          real_hb19a63e_100    conda-forge
slepc4py                  3.17.2          real_h45d0737_101    conda-forge
snappy                    1.1.10               h9fff704_0    conda-forge
sniffio                   1.3.0                    pypi_0    pypi
soupsieve                 2.4.1                    pypi_0    pypi
sqlite                    3.40.0               h4ff8645_0    conda-forge
stack-data                0.6.2                    pypi_0    pypi
suitesparse               5.10.1               h9e50725_1    conda-forge
superlu                   5.2.2                h00795ac_0    conda-forge
superlu_dist              7.2.0                h25dcc4a_0    conda-forge
svt-av1                   1.4.1                hcb278e6_0    conda-forge
sysroot_linux-64          2.12                he073ed8_15    conda-forge
tbb                       2021.9.0             hf52228f_0    conda-forge
tbb-devel                 2021.9.0             hf52228f_0    conda-forge
terminado                 0.17.1                   pypi_0    pypi
tinycss2                  1.2.1                    pypi_0    pypi
tk                        8.6.12               h27826a3_0    conda-forge
...
ufl                       2017.1.0                 pypi_0    pypi
unicodedata2              15.0.0          py310h5764c6d_0    conda-forge
uri-template              1.2.0                    pypi_0    pypi
urllib3                   1.26.15            pyhd8ed1ab_0    conda-forge
utfcpp                    3.2.3                ha770c72_0    conda-forge
vtk                       9.2.6           qt_py310h2e23b3e_201    conda-forge
wcwidth                   0.2.6                    pypi_0    pypi
webcolors                 1.13                     pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.5.1                    pypi_0    pypi
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
...

Always thanks.

Could you try:

sudo docker run -ti  -p 8888:8888
-v $(pwd):/root/shared -w /root/shared --name=dolfinx dolfinx/lab:v0.6.0-r1
1 Like

Thank you Dokken, now the docker recognizes my local path!! :grinning: