Code-server (VS Code) as a potential binder-example?

Hi All,

Question

Would it be possible to use code-server on binder?

Context

With the types of applications in binder-examples it appears it would be feasible, but I do not yet know the complexities of making a new application work with binder. This post will also serve as a note to myself when I find time to dig into this.

Motivation

VS Code is becoming a popular editor, and I would like to use it as an easy entry-point to try out the editor on some example code without having to install anything. That way I could teach some VS Code basics without having to change anything on the participant’s computer.

I’ll probably answer my question when I find some time, but if anyone has a quick insight that won’t take much time out of your day, I would be appreciative.

Thanks!
James

I think so. I believe @betatim got code-server working already with Binder here.

3 Likes

If someone has a moment to update it to the latest version of code-server that would be great and probably improve things a bit (because code-server keeps getting better) :slight_smile: I’d merge a PR that proposes this.

2 Likes

Looks like @manics did that part here. It can be launched via this url.
Do you want to upgrade Jupyterlab to a more current version at the same time?

2 Likes

I have not used code-server before and now I am a bit stuck in how to use it once it has started over binder.

I came up to this JupyterLab window:

And frankly speaking I am not sure what I should expect. In which way can we use VS Code afterwards?

When I read a bit of of the code, I got the expectation that there should be some kind of quick starter on the web interface. But maybe I am mistaken?

EDIT: In addition, I ran the postBuild script again and it ran into errors:

jovyan@jupyter-manics-2dvscode-2dbinder-2d9z7s722y:~$ bash postBuild
Enabling: jupyter_server_proxy
- Writing config: /home/jovyan/.jupyter
    - Validating...
      jupyter_server_proxy  OK
An error occured.
ValueError: This extension does not yet support the current version of JupyterLab.


Conflicting Dependencies:
JupyterLab              Extension      Package
>=1.2.1 <1.3.0          >=0.19.1 <0.20.0@jupyterlab/application
>=1.2.1 <1.3.0          >=0.19.1 <0.20.0@jupyterlab/launcher
See the log file for details:  /tmp/jupyterlab-debug-y99dz309.log
[LabBuildApp] JupyterLab 1.2.6
[LabBuildApp] Building in /srv/conda/envs/notebook/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
\

See here and launch from here. This is the updated info.

2 Likes

Thabk you very much @fomightez