  The numerical simulation of the diffusion MRI signal arising from complex
tissue micro-structures is helpful for understanding and interpreting imaging
data as well as for designing and optimizing MRI sequences. The discretization
of the Bloch-Torrey equation by finite elements is a more recently developed
approach for this purpose, in contrast to random walk simulations, which has a
longer history. While finite elements discretization is more difficult to
implement than random walk simulations, the approach benefits from a long
history of theoretical and numerical developments by the mathematical and
engineering communities. In particular, software packages for the automated
solutions of partial differential equations using finite elements
discretization, such as FEniCS, are undergoing active support and development.
However, because diffusion MRI simulation is a relatively new application area,
there is still a gap between the simulation needs of the MRI community and the
available tools provided by finite elements software packages. In this paper,
we address two potential difficulties in using FEniCS for diffusion MRI
simulation. First, we simplified software installation by the use of FEniCS
containers that are completely portable across multiple platforms. Second, we
provide a portable simulation framework based on Python and whose code is open
source. This simulation framework can be seamlessly integrated with cloud
computing resources such as Google Colaboratory notebooks working on a web
browser or with Google Cloud Platform with MPI parallelization. We show
examples illustrating the accuracy, the computational times, and parallel
computing capabilities. The framework contributes to reproducible science and
open-source software in computational diffusion MRI with the hope that it will
help to speed up method developments and stimulate research collaborations.
