-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headless container with mne pyvista backend #8659
Comments
@christianhacker your https://github.com/mne-tools/mne-python/blob/master/server_environment.yml You see PyQt5: not found in For headless you shouldn't need it, and if you have it but not all the libs to run it you will have problems... |
I tried it both ways. I get a module import error for |
Can you give the error there? That way we're sticking to the stock MNE instructions as much as possible. |
Here you are:
|
@GuillaumeFavelier can you figure out how we end up in this |
I don't think the import mne
mne.viz.set_3d_backend('notebook') |
That works, per our conversation on gitter. I suppose my question is whether the pyvista backend, not the notebook backend, works for a notebook in a headless server. I know that pyvista works just fine (confirmed with a simple sphere example), but mne with the pyvista backend does not appear to work in this specific situation. (Edit) I realize this probably isn't a priority right now; mayavi covers most of my use cases anyway. It is interesting however that pyvista appears to function correctly in jupyter notebook, and jupyterlab to boot, but mne with the pyvista backend does not. |
I think this is where the disconnect is -- the When you don't do |
Yes, I understood that the notebook backend does use pyvista under the hood. The mne documentation suggests as much. However, I would like to be able to have an interface controlled solely by mouse clicks, not ipywidget sliders, as is the case with mayavi (virtual display) or simple pyvista examples unrelated to mne. This is sounding more and more like a feature request than a bug. I made an assumption about I may have misunderstood the meaning of the mne headless install instructions. It appears that the instructions for mayavi and pyvista do not result in a functionally analogous environment; the former does not require sliders for interactive control, while the latter does. Is that correct? |
Correct and although it might be possible to disable those sliders for the
We tried multiple backends (associated with |
Understood, closing. Thank you for taking time to address this; my lab is tied to brainstorm currently and I'm looking to redo as much of our pipeline as possible in MNE, eventually. Being able to share a completely self-contained development environment with colleagues, without having to deal with Matlab licensing or requiring a physical monitor, would be great for reproducibility and consistency. I'll give the prototype a shot - thanks @GuillaumeFavelier, @larsoner. |
Describe the bug
Attempt to follow instructions for headless install of MNE-Tools. See this gist for config.
Steps to reproduce
Now open
http://localhost:8888/tree?
in a browser. Download and try running the Plotting EEG sensors on the scalp example in this jupyter server.Expected results
Jupyter notebook properly renders the scalp electrode example by returning the widget.
Actual results
Code cell 2 of the above example does not render scalp plot. Kernel crashes, get error message:
qt.qpa.xcb: could not connect to display
If I launch an Xvfb virtual display via:
xvfb-run -s '-screen 0 1920x1080x24'
as part of the docker entrypoint script (uncomment line 9 in docker-entrypoint.sh) and install libraries required by pyvista, the plotting cell executes without error, but nothing is returned. If I explicitly return
fig
in a separate cell, I get:<mne.viz.backends._pyvista._Figure at 0x7fde97989c70>
Additional information
The text was updated successfully, but these errors were encountered: