jupyterhub / jupyter-remote-desktop-proxy

Run a Linux Desktop on a JupyterHub
BSD 3-Clause "New" or "Revised" License
113 stars 105 forks source link

Stop vendoring noVNC #77

Closed yuvipanda closed 8 months ago

yuvipanda commented 8 months ago

We have been vendoring noVNC to get vnc_lite.html, maintaining a patch file so we could upgrade the version of noVNC used if needed.

noVNC publishes a JS library onnpm that we can easily use instead, and stop vendoring the whole package! This brings us the following massive advantages:

  1. No more vendoring an entire package in!
  2. Upgrades of noVNC client become practically trivial
  3. We can change the frontend as we wish much more easily, compared to having to maintain a patch file as we do now. PRs like https://github.com/jupyterhub/jupyter-remote-desktop-proxy/pull/7 become easier.
  4. There's also some possible licensing issues around us vendoring this anyway https://github.com/jupyterhub/jupyter-remote-desktop-proxy/issues/27#issuecomment-1737925373, this will get rid of that

This PR:

github-actions[bot] commented 8 months ago

Binder :point_left: Launch a binder notebook on this branch for commit a59abc47f79bda12c9d7f98c403830ee9cb7759f

I will automatically update this comment whenever this PR is modified

Binder :point_left: Launch a binder notebook on this branch for commit 823b155e3b86484a0c25ae329842677b5102def4

Binder :point_left: Launch a binder notebook on this branch for commit 68e25d07d088eb40b16f4b6dbd866727d6e52b5a

Binder :point_left: Launch a binder notebook on this branch for commit 3a6e81e59912a4b3f67a32c725dfe721b9a97b28

Binder :point_left: Launch a binder notebook on this branch for commit 296f78196ad72d5ea853e2d38b488bd5540add44

Binder :point_left: Launch a binder notebook on this branch for commit 704151c03fc5969ea071bae190e492d99568fc85

Binder :point_left: Launch a binder notebook on this branch for commit 7ac5182c66a0b0de01419be0154dc6336a3871d8

Binder :point_left: Launch a binder notebook on this branch for commit 0ba06897707e62e6ebf25f56da082b9211697bb6

Binder :point_left: Launch a binder notebook on this branch for commit cfb1a14a3e472ca3c977872145638a5299e92d56

yuvipanda commented 8 months ago

mmmmmmmmmmm love it

Screen Shot 2024-02-03 at 1 42 43 AM
yuvipanda commented 8 months ago

Once this gets merged, I'll cleanup the JS file a little and implement a version of #7

yuvipanda commented 8 months ago

https://github.com/novnc/noVNC/blob/master/docs/API.md there's also a bunch of stuff we can do to make the experience better, like automatic reconnects, sending resize events through, save screenshots, etc.

manics commented 8 months ago

The desktop fails to load on mybinder: Loading failed for the <script> with source “https://notebooks.gesis.org/binder/jupyter/user/jupyterhub-jupy-e-desktop-proxy-rk6lnz86/desktop/dist/viewer.js”.

yuvipanda commented 8 months ago

@manics ah interesting, it works for me locally in a container. wonder why. I'll dig through and see.

yuvipanda commented 8 months ago

I can reproduce the failure on mybinder! Shall test.

yuvipanda commented 8 months ago

Interesting, but it works on a JupyterHub!

yuvipanda commented 8 months ago
(base) jovyan@jupyter-jupyterhub-2djupy-2de-2ddesktop-2dproxy-2d85ah8316:~$ ls /opt/conda/lib/python3.11/site-packages/jupyter_remote_desktop_proxy/static/
clipboard.svg  index.css  index.html

Alright, this is something about how the image is being built.

yuvipanda commented 8 months ago

@manics it works now!

yuvipanda commented 8 months ago

I'm going to add a quick test to make sure that the wheel and sdist have the built files too

yuvipanda commented 8 months ago

Cleaning up some JS on top in https://github.com/jupyterhub/jupyter-remote-desktop-proxy/pull/78

yuvipanda commented 8 months ago

yay thank you @manics! Take a look at the other PRs too when you get a minute :D When done, I'll make a release.