Installation of dolfinx_mpc via docker

Hi everyone,

docker run -ti dolfinx/dolfinx:stable does not include dolfinx_mpc library/module.

Isn’t GitHub - jorgensd/dolfinx_mpc: Extension for dolfinx to handle multi-point constraints. merged to stable branch?

Best,
Ufuk

DOLFINx_mpc is a standalone library, it is not part of DOLFINx.
You can find docker images including dolfinx_mpc at: Package dolfinx_mpc · GitHub

Thanks for the answer.

I see that dolfinx-mpc is listed in

Does that mean that I can install dolfinx-mpc in docker?
docker pull dolfinx/dolfinx:stable

I tried it in the docker image but after apt upgrade

root@b650ce5a7959:~# apt install dolfinx-mpc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dolfinx-mpc

Best,
Ufuk

You need to call

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt update

First

In the container

sudo add-apt-repository ppa:fenics-packages/fenics

gives

bash: add-apt-repository: command not found

Then we tried

apt install software-properties-common

to install add-apt-repository but apt install dolfinx-mpc didn’t work again:

root@b650ce5a7959:~# apt update
Hit:1 https://ppa.launchpadcontent.net/fenics-packages/fenics/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease                                                     
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [754 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [5557 B]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [799 kB]
Fetched 1669 kB in 50s (33.4 kB/s)                                                                                                   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
23 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@b650ce5a7959:~# apt install dolfinx-mpc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dolfinx-mpc

Best,
Ufuk

As seen in: Packages in “FEniCS PPA” : FEniCS PPA : “FEniCS Packages Team” team
you need to call apt-get install python3-dolfinx-mpc.

Please note that since you are using apt to install dolfinx, you could start with the ubuntu:22.04 docker container, as you will overwrite all installations of DOLFINx by using apt.

Thank you for your solution.