Open sfabbro opened 2 years ago
I've been thinking more about this lately since I am a heavy VS Code user. I think there are two ways it could be made possible. One is hosting a browser based VS Code instance as described above. The other is enabling SSH access into any running session. With this optiona user's local VS Code instance could connect into the container using VS Code Remote: https://code.visualstudio.com/docs/remote/remote-overview I use VS Code Remote frequently to interact with UVic servers and Compute Canada log in nodes and it works very well.
I mention SSH access because as an outsider, it seems like it would provide a general solution to users wanting to interact with software in a session other than through HTTP (via port forwarding) and because many of the pieces appear to already be there in order for us to access files over SFTP.
Hi @sefffal - I believe the ssh proposal is possible already and Isaac Cheng (@bearbearcodes ?) is doing it?
I think Isaac was using a connection to skaha directly rather than ssh, following this blog.
Let us know your experiences, especially if you are missing important features compared to a hosted VSCode on the browser.
Ah okay thanks @sfabbro, I understand. That is really clever but is unfortunately somewhat specific to Python. There, the local extension for loading Jupyter notebooks in VS Code connects to a remote Jupyter kernel to run code.
This is distinct from VS Code remote where the editor frontend runs locally but the whole editor backend is run on the remote server and proxied over SSH. For example, with VS Code Remote the file browser shows the remote files, launching a terminal runs commands on the remote server, etc. This also supports all languages and extensions rather than primarily python notebooks.
Whoops I just received these notifications.
Yes currently I am using sshfs
and/or remote Jupyter notebooks to remotely connect to the science platform. sshfs
is for convenience but, as @sefffal pointed out, I need to use a feature specific to Jupyter notebooks to run the Python notebook on the science platform's kernels.
I agree that having SSH access would be nice, though. I use VS Code remote for my Windows Subsystem for Linux and it has been a complete game-changer. Additionally, sshfs
sometimes has weird disconnection issues that I still haven't been able to fix, but my understanding is that SSH is generally more stable.
Also I should note that I am unable to use the full power of VS Code remote with sshfs
as it is not the same as the standard SSH port.
For example, I currently mount my /arc
filesystem to my Linux subsystem using sshfs
, but VS Code remote is still connected to my Linux subsystem rather than the remote server. One of the biggest limitations of this approach is that any terminal commands I enter must be done through the science portal (via the web browser) as VS Code cannot connect to the actual remote server.
Looks like it will be easier to do a VSCode server side very soon: https://code.visualstudio.com/blogs/2022/07/07/vscode-server
VSCode includes a full IDE and is compatible with notebook. There is a browser-based version. While users can launch it locally and connect to /arc with sshfs, do we want to maintain a VScode session?