coiled / feedback

A place to provide Coiled feedback
14 stars 3 forks source link

VS Code Server support in Coiled Notebooks #301

Open jacobtomlinson opened 2 weeks ago

jacobtomlinson commented 2 weeks ago

This is probably a quick yes/no. Is there a way to change the application that gets launched by Coiled Notebooks?

I know some hosted notebook platforms just expect an application to run on port 8888 for proxying, and let you specify a custom startup command. We often see folks using VS Code Server in place of Jupyter on these services.

Is this viable on Coiled?

ntabris commented 2 weeks ago

It doesn't work today, I tried this a while ago and got as far as this:

image

I think based on https://github.com/microsoft/vscode/issues/191276 that we'd have to do some extra work to make the TLS termination that happens on the VM configurable.

jacobtomlinson commented 2 weeks ago

Perhaps as a follow up then is there a way to SSH through to the container on the VM using regular SSH (not coiled cluster ssh). That way it could be accessed via the VS Code SSH extension.

ntabris commented 2 weeks ago

is there a way to SSH through to the container on the VM using regular SSH

Yes!

  1. Make a cluster, make sure you allow ingress for SSH. For example coiled.Cluster(..., allow_ssh_from="me") or any coiled run ... will have 22 open ingress coming from your IP address.
  2. Add the SSH key for this cluster to your local agent by running coiled cluster ssh --add-key (you can also specify cluster by ID or name in this command, it defaults to the latest cluster if you don't specify).
  3. Use coiled cluster address to get the address, which could (for example) be plugged directly into an SSH command like ssh "ubuntu@$(coiled cluster address)".
  4. When you're done, coiled cluster ssh --delete-key will remove the key from your local agent if you care about that.