Skip to content

matplotlib GUI in a Docker container #801

@yunjunz

Description

@yunjunz

In the docker container, testings, including MintPy/tests/smallbaselineApp.py, on my laptop work very well, except for one issue: when I started an interactive shell session as below, view.py seems to work well (normal print-out messages), except that the plotting window is not popping up. Any idea?

docker run -it -v ~/data:/home/mambauser/data --name mintpy ghcr.io/insarlab/mintpy:latest
cd data/test/FernandinaSenDT128/mintpy
view.py velocity.h5

FYI, view.py velocity.h5 --nodisplay also works (successfully plotted and saved the figure into a file). So this seems to be an interactive plotting window issue.

Originally posted by @yunjunz in #696 (review)

The issue does come down to X.Org windows system issue, that is a bit annoying to work around and can induce some security risks. Further reading:

There's a couple tools that solve a lot of the issues that are more-or-less straightforward to use that set up X.Org windows system between the host and the container:

But since we include Jupyter, that's the easiest/best path to plotting figures in the container.

Originally posted by @jhkennedy in #696 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions