How to set up Basix dependancy in Docker?

So currently I opted for:

docker run -ti dolfinx/dev-env:current

which I cloned:

git clone GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment

into the docker image’s /root/dolfinx folder

I had to spack fenics-dolfinx@main and py-fenicsx-dolfinx and install one after the other into and spack env and activate the environment and the dolfinx/cpp/build/cmake …

No problems there for a make, sudo make install.

So far I can connect to the docker image through vs code’s remote access window feature. So I got the idea that Basix 0.7 was installed by spack since the red text asking for Basix 0.7 of dolfinx cpp build went away after spacking.

So currently here is the thing I am aware that I have to install Basix of some version but I know not which to get this:

Starting build...
/usr/bin/g++-11 -fdiagnostics-color=always -g /root/sandbox/main.cpp -o /root/sandbox/main
In file included from /usr/local/include/dolfinx/fem/dolfinx_fem.h:13,
                 from /usr/local/include/dolfinx.h:11,
                 from /root/sandbox/main.cpp:1:
/usr/local/include/dolfinx/fem/CoordinateElement.h:12:10: fatal error: basix/element-families.h: No such file or directory
   12 | #include <basix/element-families.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

to go away so that g++11 can compile an include of dolfinx.h. Anyone can help me I see the github current version of Basix 0.60 may or may not be a way to?

Anyone know how to get Basix into the docker image for this type of situation?

(OK about Dockerfile.test-env, say I had run a docker build with the example command and it had run and not really created a docker image or running container for whatever reason. Gosh if there were a way to run it maybe on my existing container and have the dependancies install?)

You are mixing a whole lot of ways of installing dependencies here. If you are using docker, why not just use the end user images, i.e. docker run --rm -it -v $(pwd):/root/shared -w /root/shared dolfinx/dolfinx:v0.6.0-r1 which has the C++ interface of both basix and DOLFINx installed.

You can compile code with

cmake -G Ninja -B build-dir .
ninja -j2 -C build-dir/
1 Like

Yeah… The demo folder of a real dolfinx I compiled it there is a poisson.h there and a complex path for an installation to use it.

Not sure how to interpret this comment. This means issue resolved right?

Yeah issue is resolved it…