Skip to content

script for connecting visual studio code to colab

License

Notifications You must be signed in to change notification settings

DSgUY/colab-and-VSC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

1) Run the script

This is a copy & paste & run script but you need to make 2 changes:

  • <PASSWORD> : set your user passoword.
  • <TOKEN>: paste your ngrok token.

2) Install Remote - SSH extension

Then you have to open your VSC and install Remote - SSH extension.
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh

3) Edit the configuration file

Use Ctrl+Shift+P and search for: Command 'Remote-SSH: Open Configuration' and paste the output of the script.

4) Connect to colab

Use Ctrl+Shift+P and search for: Command 'Remote-SSH: Connect to Host...'
Select colab-ssh.
Confirm that you have a LINUX server.
Confirm you want to CONTINUE.
Enter the password fot the one you change in the script.
Wait for VSCode to download some files to your colab folder to run the VSC server.

5) Installing Python extension on VSC server

Before opening in the VSC workspace you need to install Python extension on the VSC server.
Go yo extension tab on the left and search for Python extension.
You will see that is already installed in your local VSC but not in the server.
Install it.

6) Navigate to colab notebook folder

If everthing is ok you will see a pop-up to navigate trought google drive folders.
If not, go to the Explorer tab on the left.
Select the path to: /content/drive/My Drive/Colab Notebooks/ Input your password.
Open a jupyter notebook.

7) Now yes....

VSC code will do everthing you are use to.
It will configure workspace and ask for a python path: Select: /usr/bin/python
You will see that .vscode folder is now living in colab folder with a settings.json with this path.

8) Now yes.... yes

Is everything ok the jupyter server is going to start.
You can now use VSC code as your coding best friend and run your script on your colab ...your also best friend.

About

script for connecting visual studio code to colab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published