Skip to content
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

Javis on headless servers #297

Open
agerlach opened this issue Dec 3, 2020 · 7 comments · May be fixed by #298
Open

Javis on headless servers #297

agerlach opened this issue Dec 3, 2020 · 7 comments · May be fixed by #298
Labels
enhancement New feature or request

Comments

@agerlach
Copy link
Contributor

agerlach commented Dec 3, 2020

Is your feature request related to a problem? Please explain.
Javis currently depends on Gtk.jl to support the LiveViewer. This can prove troublesome for headless servers as Gtk requires a display. Also, this is a heavy dependency and is not, as far as I can tell, required for the core function of Javis.jl.

Describe the solution you'd like
Place the LiveViewer in a separate package to remove the Gtk dependency

Describe alternatives you've considered
Include additional documentation of how to work around this. I was able to get it to work by mirroring how Gtk.jl handles CI (https://github.com/JuliaGraphics/Gtk.jl/blob/master/.travis.yml), i.e., install xvfb and start julia w/ xvfb-run julia

Additional context
I frequently use VSCode + Code Spaces to do my dev in the cloud. Everything works as if it was native including displaying the resulting gif. VSCode plugins like Gif Player can then provide the function of the LiveViewer as shown below.

As a side note, VS Code online is being merged into GitHub Codespaces, so I expect others may adopt this sort of workflow soon to ease PRs.

image

@agerlach agerlach added the enhancement New feature or request label Dec 3, 2020
@TheCedarPrince
Copy link
Member

@agerlach - I think this is a very valid proposition. In fact, we tried to work around this heavy dependency with #193 and #225 but were not able to do so. The version of Javis that we are working on (v0.4.0), will include support for Jupyter (#288) and Pluto (#208) notebooks. There was already discussion about moving the support for those modules into another Julia pkg for Javis and I think if we did that, it would make sense to also move the liveviewer around to that repository. Perhaps we could call it JavisView or something.

In the interim, you are welcome to experiment with issue #225 to disable GTK. Otherwise, it may be a month or two before we release version 0.4 with this new functionality as @Wikunia and I are quite busy currently.

However, before anything, what do you think of this @Wikunia ?

@TheCedarPrince
Copy link
Member

By the way @agerlach - two additional questions:

  1. What is it you are trying to use Javis for on a headless server? Always curious about use cases for Javis.

  2. That is an awesome workflow! Could I potentially convince you to make a PR about it for our workflow documentation section? If you are busy, no worries - just thought it looked great!

@agerlach
Copy link
Contributor Author

agerlach commented Dec 3, 2020

  1. There is really nothing special about using the headless server. It is actually a work around to a different problem. I have a Mac for work and I don't have admin rights. There are some upstream issues that have put me in artifact hell. Essentially, I get dylib mismatches for some reason. I could fix them by installing the libraries w/ homebrew, but some of them require admin rights to install. This makes using Javis fail. However, I have some cloud accounts with admin rights which leads me here!

I hope to make an animation to illustrate the concept at 2:02. This process can be thought of local expansion/contractions of a state-space.

I do use VSCode + Code Space quite frequently for other work though. E.g. if I need to access a GPU.

  1. I think I can manage something. I went through the tutorials the other day and have some notes for corrections in the docs. Are you OK w/ me just doing a single doc PR and I'll address this too. I'll make an issue 1st to discuss something. Some suggest changes are purely stylistic.

@TheCedarPrince TheCedarPrince linked a pull request Dec 4, 2020 that will close this issue
7 tasks
@TheCedarPrince
Copy link
Member

Hey @agerlach - this is not a perfect fix yet, but I created a branch for you that does not utilize GTK or incorporate usage of the liveviewer. Here is the branch to check out and use for Javis #298

That should hopefully work as a stopgap solution for you for now. @Wikunia and I will need to discuss more about how to handle the live viewer.

Let me know if you have any issues! When you are done with your animation - we'd love to see it as well! Would be happy to include it in our examples section to show how Javis could be used. :)

Regarding the PR, sure! Ping @Wikunia and I when you open the issue. We can chat about it there and go forward with the PR. Thanks!

@Wikunia
Copy link
Member

Wikunia commented Dec 4, 2020

Thanks for opening up the issue @agerlach . I didn't know about the gif player plugin in vs code. This can be quite helpful. I agree that it makes sense to have a JavisViewers.jl in the future.

Oh and yeah we would love to see documentation PRs or a single documentation pr

@TheCedarPrince
Copy link
Member

Oh btw @agerlach - would you still be willing to open a PR on Javis regarding the workflow you described? Thanks!

@agerlach
Copy link
Contributor Author

Yeah. I am working through a backlog of things that need done before the holidays. It is in the queue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants