You may consider using jupyter-server-proxy
I compiled and wrote plugins to run several apps within jupyterlab. Not all work well, but code-server does, though you may need to adapt it to your environment:
I was surprised but it was simple as others suggested:
# To install Server Proxy Extension for Lab
sudo /usr/local/anaconda3/bin/python3 -m pip install jupyter-server-proxy
# To Install VSCode code-server for proxying
sudo /usr/local/anaconda3/bin/python3 -m pip install jupyter-vscode-proxy
# Restart the hub for changes to apply
sudo systemctl restart jupyterhub.service
On login I see the VSCode icon next to iPython notebook … Concerns for myself include sudo for pip and also I am not running Hub at container, so the ports are exposed for other users I think… for test & dev this worked nicely, glad to run VSCode on the same remote host as Python kernel
One issue seems to be that code launches jupyter server from the preinstalled python 3.6 instead of the conda notebook environment. If I open the Interactive Window it then installs pip and ipykernel in the python 3.6 environment. Then I can change Interactive Window to conda notebook environment and work in there. Sometimes I can then even get cells in notebook to execute. But I’ve not found the exact steps yet to get it working. Seems random.
I didn’t found a way to really solve the issue, but I finally settled for a workaround.
The users are connected first on the JupyterLab interface, and they can click on a link to start CodeServer (see picture below).
After that, VS Code was able to find and connect to the right kernel.
My question is: is there a way to automate the Python extension installation, so users don’t have to do this manually every time?
It would be nice with a configuration option to include the VS Code editor with proper installations. It seems to become something that people want to do almost as much as using notebooks. Let me know if there is anything that I can do to help with this.
I have some issues with code server when it runs with JupyterHub on a GKE cluster, while it works perfectly when I test it locally in a Docker container. At first, I thought that it could be caused by an NFS server that I was running for shared data (another container), but I tried to deactivate the NFS server, and the issue still seems to persist. Based on what you are writing here, can there be an issue with having different node pools? For example, one for users and one for the hub.
It would be nice with a configuration option to include the VS Code editor as it is becoming very popular to use through a web browser. Not as a substitute for JupyterLab, but as a supplement for complex development. I will gladly help to make this happen however I can