VS Code from JupyterLab in a container - anyone pulled this off?

I’ve been told by an old student of mine that her current employer has k8s running pods which can spawn VS Code for them to use, from JupyterLab. My Google-fu is failing me, and I can’t find anyone talking about their implementation of this.

Has anyone seen this done? I’ve got a lovely little z2jh cluster running for my students, with Docker images that spawn RStudio directly; or spawn JupyterLab so students can choose to start RStudio, or can choose other options; or a third image that spawns Jupyter Notebook with the Sage kernel, for mathematical software users.

It would be great to have the second one, that spawns into the Lab interface, have additional applications available on the launch pane, including (but especially) VS Code, for those who really would like that IDE.

Anyone know of a reference to how someone pulled this off?

As far as I know you can’t run the official VSCode yourself in Jupyter (though I might well be wrong!), but you can run one of the related forks:

1 Like

You can use jupyter_server (backend server for JupyterLab and Notebook) as a proxy to spawn a code-server using jupyter-server-proxy. The repo @manics linked provides an entry point to jupyter-server-proxy to spawn a code-server (which is VSCode in browser).

Here is another implementation of entry of code-server that uses unix sockets instead of TCP port.

1 Like