You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm working with Colab, I store my project files on Google Drive under a particular folder. After initiating a Colab SSH connection and opening it from VS Code, I have to manually navigate through from the root folder on the Colab VM, all the way into my mounted Google Drive folder where my project files are stored to open them on VS Code and work with the files.
Feature Request:
I hope it'll be possible to specify a folder location (present on the VM) from the Colab Notebook, such that upon launching the SSH connection, I get a VS Code button (Similar to the GitHub VS Code button) to click and automatically open a VS Code instance on my local machine, opened to the previously specified folder on Colab.
Describe Alternatives You've Considered:
I have tried using the SSH Config command called RemoteCommand, to try and cd into the folder I want while I'm connected to the Colab VM through VS Code, but this doesn't work, to begin with, and even if it did, it only changes the directory on the terminal and not the folder into which VS Code is opened.
Additional Context:
For example, I'm looking to specify something like launch_ssh_cloudflared(password=password, open_folder_path='/content/drive/MyDrive/Colab Notebooks/') on the Colab Notebook while launching a SSH Tunnel, while it outputs a button like such upon execution:
Upon clicking this button, I expect it to open VS Code instance on my local machine into the specified Colab Notebooks folder (in this example), like this:
The text was updated successfully, but these errors were encountered:
So, I've done some digging into this on my own, and as much as I would like to make a Pull Request, I'm not entirely sure how to test and make sure there isn't any missing logic that might break functionality. I'll leave my findings here so you can build them into the project if you're interested, but if you would rather that I try and make a Pull Request, I'll try my best to work on it and build this functionality into the project.
So there will be two new parameters that launch_ssh_cloudflared will take, namely, starting_directory="/content", and vscode_build=stable. The possible inputs for starting_directory is an absolute path on the Colab VM's filesystem (with the default being /content, which is the default starting directory for a Colab Notebook VM), and the possible inputs for vscode_build will be stable(by default), or insiders.
Inside the launch_ssh_cloudflared function, you can check for the starting_directory parameter, and generate an IPython Display cell (just like is being done for the Git Repositories when using the init_git_cloudflared function) with the generated link logic for the button being:
(Note: The difference in the handler URI for users with the Stable VS Code build and the Insiders VS Code build, might be something you want to consider handling even for the init_git_cloudflared function too)
I hope you would consider writing this functionality into the project, as I believe that some users, including myself, who work on specific directories (mounted Google Drive locations) in Colab will find this feature useful to automatically open into, every time. Greatly appreciate the work you've done with Colab SSH so far. It's by far, such a game changer in the way I use Google Colab for my work.
Source Problem:
When I'm working with Colab, I store my project files on Google Drive under a particular folder. After initiating a Colab SSH connection and opening it from VS Code, I have to manually navigate through from the root folder on the Colab VM, all the way into my mounted Google Drive folder where my project files are stored to open them on VS Code and work with the files.
Feature Request:
I hope it'll be possible to specify a folder location (present on the VM) from the Colab Notebook, such that upon launching the SSH connection, I get a VS Code button (Similar to the GitHub VS Code button) to click and automatically open a VS Code instance on my local machine, opened to the previously specified folder on Colab.
Describe Alternatives You've Considered:
I have tried using the SSH Config command called
RemoteCommand
, to try andcd
into the folder I want while I'm connected to the Colab VM through VS Code, but this doesn't work, to begin with, and even if it did, it only changes the directory on the terminal and not the folder into which VS Code is opened.Additional Context:
For example, I'm looking to specify something like
launch_ssh_cloudflared(password=password, open_folder_path='/content/drive/MyDrive/Colab Notebooks/')
on the Colab Notebook while launching a SSH Tunnel, while it outputs a button like such upon execution:Upon clicking this button, I expect it to open VS Code instance on my local machine into the specified
Colab Notebooks
folder (in this example), like this:The text was updated successfully, but these errors were encountered: