Thanks for the answer. Actually, this code requires the dolfinx_mpc library which is not on the docker image of dolfinx. So I’ve tried to clone the repository of dolfinx_mpc into the dolfinx image and try to install it with :
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build-dir cpp/
ninja -j3 install -C build-dir
pip3 install python/. --upgrade
But I got this error message (this is just a part of the error message):
root@e0e35fdee648:~/dolfinx_mpc# ninja -j3 install -C build-dir
ninja: Entering directory `build-dir'
[1/12] Building CXX object CMakeFiles/dolfinx_mpc.dir/PeriodicConstraint.cpp.o
FAILED: CMakeFiles/dolfinx_mpc.dir/PeriodicConstraint.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_TIMER_DYN_LINK -DDOLFINX_MPC_VERSION=\"0.4.1.0\" -DDOLFINX_VERSION=\"0.4.2.0\" -DHAS_ADIOS2 -DHAS_PTSCOTCH -DHAS_SLEPC -Ddolfinx_mpc_EXPORTS -I/root/dolfinx_mpc/cpp -I/root/dolfinx_mpc/cpp/dolfinx_mpc -isystem /usr/local/lib/python3.10/dist-packages/ffcx/codegeneration -isystem /usr/local/petsc/linux-gnu-real-32/include -isystem /usr/local/petsc/include -isystem /usr/local/dolfinx-complex/include -isystem /usr/local/slepc/linux-gnu-real-32/include -isystem /usr/local/slepc/include -O3 -DNDEBUG -fPIC -std=c++20 -MD -MT CMakeFiles/dolfinx_mpc.dir/PeriodicConstraint.cpp.o -MF CMakeFiles/dolfinx_mpc.dir/PeriodicConstraint.cpp.o.d -o CMakeFiles/dolfinx_mpc.dir/PeriodicConstraint.cpp.o -c /root/dolfinx_mpc/cpp/PeriodicConstraint.cpp
/root/dolfinx_mpc/cpp/PeriodicConstraint.cpp: In function 'dolfinx_mpc::mpc_data {anonymous}::_create_periodic_condition(const dolfinx::fem::FunctionSpace&, std::span<int>, const std::function<xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>(const xt::xtensor_container<xt::uvector<double, std::allocator<double> >, 2, xt::layout_type::row_major, xt::xtensor_expression_tag>&)>&, double, const std::function<const int(const int&)>&, const dolfinx::fem::FunctionSpace&)':
/root/dolfinx_mpc/cpp/PeriodicConstraint.cpp:163:17: error: 'view' is not a member of 'xt'; did you mean 'xview'?
163 | = xt::view(tabulated_basis_values, i, xt::all(), xt::all());
| ^~~~
| xview
/root/dolfinx_mpc/cpp/PeriodicConstraint.cpp:297:13: error: 'row' is not a member of 'xt'; did you mean 'pow'?
297 | xt::row(coords_out, insert_location) = xt::row(mapped_T, i);
| ^~~
| pow
/root/dolfinx_mpc/cpp/PeriodicConstraint.cpp:297:52: error: 'row' is not a member of 'xt'; did you mean 'pow'?
297 | xt::row(coords_out, insert_location) = xt::row(mapped_T, i);
| ^~~
| pow
/root/dolfinx_mpc/cpp/PeriodicConstraint.cpp:379:19: error: 'view' is not a member of 'xt'; did you mean 'xview'?
379 | = xt::view(remote_basis_values, j, xt::all(), xt::all());
| ^~~~
| xview
[2/12] Building CXX object CMakeFiles/dolfinx_mpc.dir/SlipConstraint.cpp.o
FAILED: CMakeFiles/dolfinx_mpc.dir/SlipConstraint.cpp.o
This is my dockerfile for creating the dolfinx container :
FROM dolfinx/dolfinx:latest
WORKDIR /usr/src/app
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN apt-get update
RUN apt-get install -y vim
And this is the file I use for running the image :
docker run -ti\
--name run_test \
--rm \
-v /Users/cances/Desktop/stage_cerfacs/STORM/storm_code/src/storm:/root/storm \
-v $(pwd):/usr/src/app \
storm_image \
/bin/bash