Skip to content

Adding xvfb and xvfbwrapper#360

Merged
rosbo merged 3 commits intoKaggle:masterfrom
chrisgorgo:enh/add_xvfb
Oct 29, 2018
Merged

Adding xvfb and xvfbwrapper#360
rosbo merged 3 commits intoKaggle:masterfrom
chrisgorgo:enh/add_xvfb

Conversation

@chrisgorgo
Copy link
Contributor

Closes #359 by providing a workaround consisting of framebuffer X server that can be used to render visualizations offscreen on headless nodes. Example:

from dipy.viz import window
from xvfbwrapper import Xvfb

vdisplay = Xvfb()
vdisplay.start()

ren = window.Renderer()
window.record(ren, n_frames=1, out_path='test.png', size=(600, 600))

vdisplay.stop()

Ideally (from user convienience point of view) Xvfb should be started automatically via bash wrapper script set as an ENTRYPOINT, but that could lead to some unforseen side effects so I would suggest leaving this for another PR.

@rosbo
Copy link
Contributor

rosbo commented Oct 29, 2018

Thanks for adding tests :)

@rosbo rosbo merged commit 4092ef1 into Kaggle:master Oct 29, 2018
@TamasBaloghDev
Copy link

May God bless you @chrisgorgo for sharing this solution for the bad X server connection 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants