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

How to use WGLMakie in Jupyter Notebook through ssh? #489

Open
aramirezreyes opened this issue Feb 4, 2020 · 13 comments
Open

How to use WGLMakie in Jupyter Notebook through ssh? #489

aramirezreyes opened this issue Feb 4, 2020 · 13 comments
Labels
WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.

Comments

@aramirezreyes
Copy link
Contributor

This is a follow up to a discussion from slack (actually modifying the use case), but I think it deserves to be here so that we can work on it on an organized manner.

Case: I connect to a remote server via ssh. I launch a Jupyter notebook instance in this server, this goes back to my computer via the ssh channel.

Local machine:
  ssh -L 8889:localhost:8889 user@server -Y -X
At server:
  jupyter-notebook --no-browser --port=8889
Local machine's web browser:
  localhost:8889

Then, inside the jupyter notebook I try to use WGLMakie:

julia> using AbstractPlotting, WGLMakie; AbstractPlotting.inline!(true)
julia> plot(rand(10))

Result:
I get no plot, instead I get an error

Firefox can't establish a connection to the server at 127.0.0.1:8081
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Desired result: I see a nice looking plot in my browser.

How could I make this work?

@SimonDanisch
Copy link
Member

With a bit of luck, changing the port to 8081 could make things work

@aramirezreyes
Copy link
Contributor Author

Bad luck! Now the content was blocked by security policy. I am not sure of closing this or leaving it open so that someone else can find it when looking for a similar thing.

@SimonDanisch
Copy link
Member

Ah, but I guess that means it works almost and should be fixable somehow!
Try setting ENV["WEBIO_HTTP_PORT"] = 8889 before using WGMakie and then use that port - this may help if only that specific port is unblocked...
Otherwise, it'd be nice to see the full error, maybe with a screenshot!

@aramirezreyes
Copy link
Contributor Author

Great! I feel like it is almost there:

I am seeing an infitine loop of this:
image
in the Jupyter console
after doing plot(rand(10)),
but the cell never finishes evaluating.

@jkrumbiegel jkrumbiegel transferred this issue from JuliaPlots/WGLMakie.jl Apr 27, 2020
@jkrumbiegel jkrumbiegel added the WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie. label Apr 27, 2020
@cossio
Copy link
Contributor

cossio commented Sep 10, 2021

Did you figure this out? I have same issue. I have to use WGLMakie since GLMakie doesn't work on the server due to some OpenGL issue.

@SimonDanisch
Copy link
Member

Jupyter or Pluto?
With Pluto, this should work: https://makie.juliaplots.org/stable/documentation/remote/#wglmakie
IJulia is broken right now - i'm 90% done with a fix...

@cossio
Copy link
Contributor

cossio commented Sep 10, 2021

I use Jupyter. But I'll try Pluto.
Hope the fix gets there soon! Thanks

@cossio
Copy link
Contributor

cossio commented Nov 22, 2021

Any updates? This is what I am getting right now:

image

No plot 😞

CairoMakie works fine, though.

Pluto is not always an option, and CairoMakie is slow for large datasets. It would be nice to get this fixed for Jupyter.

@SimonDanisch
Copy link
Member

I'm working on it: SimonDanisch/Bonito.jl#111
Maybe I can get it merged this week.

@cossio
Copy link
Contributor

cossio commented Nov 22, 2021

Nice, thanks. @SimonDanisch if that PR gets merged, it means that it will just work, without any extra config?

@SimonDanisch
Copy link
Member

I'm aiming for that and it should be possible, so yes! Lets hope nothing too unexpected jinxes it :D

@cossio
Copy link
Contributor

cossio commented Nov 22, 2021

Good! Looking forward to it.

@frankier
Copy link

frankier commented Nov 9, 2022

This should help #2405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
Projects
None yet
Development

No branches or pull requests

5 participants