Hi there,
thanks a lot for this very useful script. I know you say in the README that the info from the reconnect_info
file can be used to reconnect to the jupyter instance, but how exactly do you do that? I haven't figured this out yet. Any help would be appreciated!
sfux (559be05f) at 29 Aug 06:33
Update start_jupyter_nb.sh
Dear @mlange : Thank you for your feedback. Regarding modules and environments, please check:
Jupyterhub should now work more stable as the network issue is resolved. But of course you are free to also use the script, if it makes your use-case easier than when using the jupyterhub.
Best regards
Sam
Dear Sam, thank you very much for your quick reply! I'll try out these steps.
I've been using JupyterHub before the server maintenance, and it worked nicely; however, since the maintenance, it's really fragile, and I lose connection all the time (I saw the yellow status in the wiki and the news). That's why I started using your script - I'll take another look at Jupyter Hub once the network issues are fixed.
One use case that I wasn't sure is covered by Jupyter Hub is using custom/mamba conda environments, i.e. controlling which python etc. is loaded upon starting the session. That would be important for many of my analysis workflows.
Dear @mlange,
Thank you for writing to me and for using the script that I wrote.
There are two different levels of disconnecting from a Jupyter session and the reconnect_info file contains information for all of them.
If you just by accident closed the browser window without stopping the session, then it is sufficient to just copy the URL from the reconnect_info file.
If you lost the SSH tunnel, then you can restart it with the text behind "SSH tunnel".
In your case it seems that the SSH tunnel is still there. You could therefore try to just copy the URL and see if you can reconnect to the session. If this does not work, then this would be an indication, that the SSH tunnel is still there but somehow compromised. Then you would first need to cancel the SSH tunnel (as described in the README of the script) and then restart it with the command that you already tried. After restarting the SSH tunnel, you can copy the URL and reconnect to the session.
If nothing of this works, then I would recommend to clean up and restart from scratch.
Please note that meanwhile we provide a cloud based jupyterhub with batch system integration:
https://scicomp.ethz.ch/wiki/JupyterHub
It is much easier to use than the script. We will keep the script but probably no longer update it, due to the jupyterhub being available.
Best regards
Sam
When I copy past the text behind SSH tunnel
into my terminal, I get
bind [127.0.0.1]:57944: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 57944
Could not request local forwarding.
I verified via squeue
on Euler that my job is still running.
Hi there,
thanks a lot for this very useful script. I know you say in the README that the info from the reconnect_info
file can be used to reconnect to the jupyter instance, but how exactly do you do that? I haven't figured this out yet. Any help would be appreciated!
Dear @sfux,
I have been trying to run Pyvista on Jupyter notebook. However, I haven't been able to do so. I could load and use every functionality of Pyvista except rendering (the kernel dies). Is it possible to use Pyvista for rendering on jupyter notebook? On the other hand, one could use ipygany library for rendering on Jupyter. The strange thing is that Pyvista used ipygany as a jupyter backend but still cannot render. I was wondering if it is possible to use Pyvista for rendering on jupyter notebooks?
Thanks
Thank you for your feedback. This is interesting. I was not setting any backend.
Glad to read that visualization is now working for you. I will therefore close this issue.
Best regards
Sam
Hi @sfux,
An update on running pyvista with GCC 8.2.0 and Python 3.8.5. If we set the juypter_backend option to either panel
or ipygany
, the visualization works perfectly. I follow exactly the steps that you follow, and right at the time of plotting, I set jupyter_backend. For now, every functionality works.
Thanks & Regards, Mohit
Dear @sfux
I tried it again. However, I still get the same error. I double-checked the pyvista and trame packages used, which are from your installation. I also checked whether modules mesa/18.3.6 and eth_proxy are loaded. Did the visualization work for you with GCC 8.2.0 and Python 3.8.5?
Thanks & Regards, Mohit
Dear @mpundir,
There was some package missing. I have now installed pyvista and trame for Python 3.8.5 for GCC 8.2.0.
Can you please try again? Now it should work.
Best regards
Sam
I am running the jupyter script with gcc/8.2.0 and python/3.8.5.
The key is that I don't setup the Xvfb headless display by running commands outside of Jupyter. I am just running the command
pyvista.start_xvfb()
inside the jupyter notebook, which will take care of the headless display. I tried setting environment variables before and this never worked, but the pyvista function does everything required to run the headless display.
Are you using the default modules that the jupyter script loads (gcc/6.3.0 python/3.8.5) or do you use different modules?
Thanks, @sfux However, restarting the jupyter notebook does not work. I would like to know how and where you set up the Xvfb headless display. I presume that could be the issue.
On the first try, when just restarting the jupyter kernel, I got the same message. I had to restart the jupyter notebook from scratch, running the script again and then it worked for me.
Hi @sfux,
Thank you so much for the solution. I tried the steps. However, I get the following error now.
Do you know what I could be missing?
Thanks, Mohit
The error is the same as discussed in
https://fenicsproject.discourse.group/t/pyvista-cannot-visualize-image-in-jupyter-lab/11113/2
but I don't know how to fix this
Thank you for providing the minimal example. I could reproduce the error and tried some suggestions from the pyvista documentation, but it did not resolve the issue.
Meanwhile I got one step further. If you run the jupyter script, then please add the option
--extra-modules mesa/18.3.6
This will load the mesa 18.3.6 library that is used for offscreen rendering. With this I don't get an error anymore, but the plotting still does not work (in the output I get the message: localhost has refused the connection):