Monalisa MRI reconstruction (Python port) with JupyterLab, napari and the tutorial
416
Monalisa reconstructs non-Cartesian and Cartesian MRI data: gridded, iterative (SENSE, L2, total variation) and motion-compensated chain reconstructions. This image contains its Python port, monalisa-python, with everything installed: Python 3.12, NumPy/SciPy/numba, the Siemens and ISMRMRD readers, SimpleITK, the napari viewer, JupyterLab, the tests and tutorial 1. Only Docker is needed on your computer.
Platforms: linux/amd64 (Intel/AMD) and linux/arm64 (Apple silicon, ARM servers).
mkdir -p monalisa/data monalisa/results
# raw data of tutorial 1 (7.9 GB, once)
docker run --rm -v "$PWD/monalisa/data:/data" mattechlab/monalisa-python \
python demo/data_demo/data_8_tutorial_1/download_data.py --out /data
# JupyterLab on http://127.0.0.1:8888 (open the link with the token printed in the terminal)
docker run --rm -it -p 127.0.0.1:8888:8888 \
-v "$PWD/monalisa/data:/data" -e MONALISA_TUTORIAL_DATA=/data \
-v "$PWD/monalisa/results:/work/examples/tutorial_1/results" \
mattechlab/monalisa-python
In JupyterLab, open examples/tutorial_1/tutorial_1.ipynb. The results are written to
monalisa/results on your computer. Other files changed in the container (the notebook itself)
are lost when it stops: use File → Download, or mount a folder of your own
(-v "$PWD/notebooks:/work/notebooks").
The same reconstructions as a script:
docker run --rm -v "$PWD/monalisa/data:/data" -v "$PWD/monalisa/results:/results" \
mattechlab/monalisa-python python examples/tutorial_1/tutorial_1.py --data /data --out /results
import monalisa works in any folder of the container: mount your project folder on
/work/mine (it appears in JupyterLab's file browser, and its files stay on your computer).
# JupyterLab with your notebooks in mine/ (File → New → Terminal runs scripts there)
docker run --rm -it -p 127.0.0.1:8888:8888 -v "$PWD:/work/mine" mattechlab/monalisa-python
# a script, without JupyterLab
docker run --rm -v "$PWD:/work/mine" -w /work/mine mattechlab/monalisa-python python my_script.py
Paths in your code are the container's: mount raw data from elsewhere as well
(-v /path/to/data:/data:ro, then read /data/scan.dat).
docker compose up in the repository uses the repository folder as the working folder (your
notebooks, code changes and results stay there); see
docs/docker.md.
Killed (exit code 137) means it was too low.docker run, otherwise Docker
creates them as root.show_image shows images with sliders, on every computer. napari
windows and interactive dialogs open from the container only on Linux:
-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix, plus --gpus all only with an NVIDIA
card and the NVIDIA Container Toolkit (without them, Docker refuses --gpus all). On macOS and
Windows, use the notebook viewer, or install monalisa without Docker for windows; see
docs/docker.md.latest, and one tag per release (0.1.0, 0.1). Cite a release tag, or its digest,
to reproduce a result exactly.Content type
Image
Digest
sha256:d90e719d1…
Size
588 MB
Last updated
3 days ago
docker pull mattechlab/monalisa-python