Hit a few dead ends setting up a slider server. Easy(ish) solution possible?

Hello everybody. Huge thanks and admiration for all the wonderful things coming out of the Julia and Pluto worlds. Astonishing :slight_smile:

I’m teaching calculus this semester and have been making Pluto notebooks to help my students visualize and play with some concepts. The notebooks are looking cool and I’ve gotten good feedback from the students except for the initial phase of opening Julia, Pluto, and launching everything. They struggle with this and it has been a bit time consuming.

Going forward, I wanted to avoid having them install Julia and Pluto, or even just opening them and possibly dealing with the computer’s terminal, etc. I also wanted to avoid using Binder so that launch speeds are optimized.

Because of this, I’ve been trying to set up a Pluto Slider Server. I’ve read some posts here on Discourse, I’ve read both Connor’s post and Fons’ readme on the PlutoSliderServer GitHub. Overall, I’ve tried a few directions but I can’t quite get it to work.

I think I have it all almost set up (huge emphasis on “think” hah). I’ve tried doing the whole configuration using my DigitalOcean server’s IP address but now when setting up Nginx it seems I need an actual domain name. I looked into Cloudflare as an alternative but it seems the same is true: an actual domain is needed. I was hoping I could ultimately just link to my droplet’s IP.

My understanding is that since I’ve cloned my GitHub’s repo into the server anyway, that maybe I could just link all of this to the GitHub page or the GitHub files themselves — could I use my GitHub pages address as the domain required by either Nginx or Cloudflare?

If I do need to purchase a domain name, would I just route it to my DigitalOcean’s IP? Or is there a way to bypass this requirement? In other words, is there a way for my students to access everything by simply visiting my DigitalOcean’s IP directly? A maximum of 30 students would be accessing the notebooks at a time; given this small scale usage scenario, is the HTTPS step necessary?

Alternatively: Is there a super short method to just install Julia, Pluto, and PlutoSliderServer on the DigitalOcean droplet, link the droplet to my GitHub with the notebook files (or host the notebook files on the droplet, avoiding GitHub altogether), and that’s it? Is it possible to do this so the students can just visit the IP directly or my GitHub pages address (or the droplet IP) and immediately access the notebooks?

In the future I would love to set this up as a secure and stable server that the students can access throughout the semester to study and review the material. For now, having them just be able to access the notebook during class without directly running Julia or Pluto on their machines (from an iPad even) would be amazing.

I am outside of my comfort zone trying to set this all up so I may be missing something that the current available resources already explain (e.g. Connor’s post and Fons’ readme). Thanks so much again everybody.

2 Likes

A perhaps easier way could be to install JupyterHub on the server (so I am speaking of “traditional” notebooks here) and get the notebook copied on the user folder, so that they can also experiment with the notebook.
It would require to get an user per single student however…

1 Like

Hey sguis!

Awesome to hear that you are using Pluto for teaching and that you set up a slider server! Just to be clear, the PlutoSliderServer will allow interaction with @bind elements, but students cannot change and run code on the server, they still need to run their own Pluto or binder to get this.

If you followed the Sample setup from the PlutoSliderServer readme (which is more up-to-date than the blog), then Part 2 should give you a running PlutoSliderServer that you can use for your class. I just updated the readme to add one section at the end of Part 2:

Yay! If everything went well, we now set up a web server with PlutoSliderServer. To see the result, you open a browser and go to the URL of your server. This looks like:

http://12.34.56.78:8080/

where 12.34.56.78 is the IP address of your server. You should see an index of your notebooks, and clicking on a notebook should give an interactive page!

In your case, this might be all that you need! Part 3 shows how to get https, but you might not need it. I also updated Part 3 to explain what the benefits are, and why you would do it.


Advice: if you followed Part 2 of the Sample Setup, then just visit http://12.34.56.78:8080/ with your droplet IP address and check if it is working the way you want! You might not need nginx, domain name, cloudflare and https, and you are done!

1 Like

Also, I’m sorry to hear that students had difficulty setting up and starting Pluto, that’s not supposed to happen! If possible, I would love to know more about what was difficult or what went wrong. Feel free to open a Pluto.jl issue, start a discourse thread or send me an email.

@ctrekker and I are working on GitHub - JuliaPluto/PlutoDesktop: Pluto.jl bundled into an easy-to-install desktop app — currently under development, which will make it much easier to install and start Pluto, and students will no longer need to work with terminals and paths to open a notebook file. But this won’t be ready before the start of the semester.

1 Like

Thanks so much, @fonsp! The interaction with just the @bind elements is perfect for most of my students. Those who want to get into the nitty gritty of the code can see me during office hours or still run Julia and Pluto when we have interactive lessons, while the others can do the simpler web-based access.

I believe it’s simple to set up and start Pluto. I think it just overwhelmed some students who have little computer experience — the terminals and paths, as you mentioned, intimidated some of them. Overall, they have all been minor issues that a preliminary workshop or video shared with the students would maybe resolve — case-sensitive syntax and things of the sort confused a few of them. Still, web-based access could be the best solution for a good amount of cases.

I saw PlutoDesktop! Amazing. It would definitely help many of the students and would be a great middle ground between ease of installing and opening and still accessing the full power of Julia and Pluto.

If any specific ideas or issues come up as the semester goes on, I’ll keep it in mind to open a Pluto.jl issue or voice it out in another way.

Thanks so much again. It’s super exciting to work with all of this, share it with students, and receive feedback from you and the community. I really think interactive lesson plans and other supplemental materials are the path forward in modern education :sunglasses:. To see mathematical ideas come to life is just … amazing.

In terms of the server: I did try the Sample setup from the readme. I wonder if I had the thing running but didn’t know it. I am going to try it again in the next day or two and will keep you posted — for now, I have to finish a couple lesson plans and grade exams heh. Thank you for updating the readme and thanks again for the reply. Looking forward to getting back to it :rocket:

1 Like

Thanks @sylvaticus! I had started to look into JupyterHub. I saw there was 2021 JuliaCon talk on setting it up to run Pluto. Not sure if your suggestion is based on the same method. Based on Fons’ reply, I will try DigitalOcean again. In any case, I appreciate it.

1 Like

No actually, I was thinking as traditional notebooks… but indeed JupyterHub can be used as a sort of login proxy for various services… I use it in particular for logging in and provide the open source version of vscode online, where I preinstall the Julia extension using the configuration script of “adduser”.
I guess for Pluto you mean this proxy one: GitHub - IllumiDesk/jupyter-pluto-proxy: Jupyter Notebook with Pluto using jupyter-server-proxy (I haven’t tested it)

1 Like

Great! Let me know how it goes and feel free to ask for help again! I might not have time to reply until Sep 20 but you can tag @pankgeorg if you don’t hear from me, we wrote the instructions together.

1 Like

A bit of a late update but… it looks like I got it to work! Very exciting!! Thank you @fonsp! (Also, hello @pankgeorg!)

I tested it with very basic notebooks and the server loads them and runs them in no time.

When I put one of my heavier notebooks on Github, they are eternally loading on the server. My understanding is that this is probably arising because I chose a very basic plan on DigitalOcean: shared CPU and 2GB RAM. The server is constantly clocking in 100% CPU but never actually loads the heavier notebooks.

I’m going to look into this because my goal is to have ~30 students running these “heavy” notebooks at a time. But, I’m not in a rush. Will post updates here as I slowly wrap my head around the necessary details and slowly get things running.

Very interesting. I was thinking specifically of this one: plutohub-juliacon2021, which may be similar to what you shared. But I’m quite out of the loop on setting these things up. Thanks @sylvaticus.

Hey! 2GB won’t work I think. The example notebooks run on an arm server with 256GBs and 80 cores :sweat_smile:. Not suggesting that of course, but do try the cheapest 16/32GB RAM you can find (check arm servers). Also make sure you use 1.10.5. Even the .5 is important :smiling_face_with_three_hearts:

Let us know how it goes!

1 Like

Thanks @pankgeorg! Makes sense, haha. I have a limited budget so I was trying to keep everything as simple as possible, at least while I experimented. I’ll see what I can do about upgrades and will keep you posted. Thanks again :smile:

I have three notebooks served by the PlutoSliderServer on a machine with 8GB RAM and a four-core 2.4 GHz processor:

https://pluton.lee-phillips.org/sliders/epicycles.html
https://pluton.lee-phillips.org/sliders/uiDemo
https://pluton.lee-phillips.org/sliders/uiDemoP2

This is a virtualized hosting setup, so I think the CPU is shared (I don’t know how it works) but the RAM is all for me. Hetzner (recommended) charges €13/month for this.

The notebooks stay up for months with no intervention, and performance seems quite good.

2 Likes

Super valuable info. Thanks so much, @LeePhillips.

Hey @sguis ! Did you get your server set up?