radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
64 stars 32 forks source link

etc/run.sh jupyterhub not including rsjupyterlab #7097

Open rorour opened 5 months ago

rorour commented 5 months ago

Running etc/run.sh jupyterhub won't include rsjupyterlab (code that changes the UI) unless that repo is available locally.

I see that container-beamsim-jupyter does a git clone of jupyter_rs_vtk jupyter_rs_radia rsjupyterlab. I think run.sh jupyterhub should do the same.

e-carlin commented 5 months ago

I think we should re-consider run.sh jupyterhub. I wrote it a while back to solve a specific problem (can't remember what...) but it is now used in more places and setting it up is a pain (ex managing deps). I'm wondering if instead we use radiasoft/container-beamsim-jupyter and then mount ~/src/radiasoft into the container. We will then run the server out of the container for testing. We can install sirepo by default. We could add flags for installing more from the host (jupyter_rs* and rsjupyterlab).

We will solve this specific problem through a flag to install rsjupyterlab (with a helpful message if ~/src/radiasoft/rsjupyterlab doesn't exist on the host).

We will solve other problems we've had over time by using the docker image which has all the deps instead of having to manage them ourselves in etc/run.sh and make sure they are in sync with the image.

The downside is programming with docker. Users will have to know how to get into the container to do things like restart the server and initial start will be slow each time because of installing sirepo and whatever else.

Thoughts?

robnagler commented 5 months ago

I think this is a good idea. jupyterhub has to have the beamsim-jupyter image anyway, because we use rsdockerspawner. That might have to be installed in rs/jupyterhub, but I don't think we need to install sirepo.

See also https://github.com/radiasoft/container-jupyterhub/issues/8

If we use container jupyterhub, then all the sirepo deps will be there and sirepo should install quickly.

e-carlin commented 3 weeks ago

I ran into this again while working on https://github.com/radiasoft/jupyter_rs_radia/issues/68 . I cobbled together a reasonable setup. One thing we'll need to handle is email auth. Running postfix as a systemd unit doesn't work out of the box because we aren't running systemd inside of docker.