Saving files & library in fenicsx environment

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