https://github.com/anusikh/vscolab
Use Google Colab GPU's and TPU's via an ssh connection locally in your device.
https://github.com/anusikh/vscolab
Last synced: about 1 year ago
JSON representation
Use Google Colab GPU's and TPU's via an ssh connection locally in your device.
- Host: GitHub
- URL: https://github.com/anusikh/vscolab
- Owner: anusikh
- License: mit
- Created: 2020-12-05T01:03:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-19T21:40:31.000Z (over 2 years ago)
- Last Synced: 2024-11-11T10:57:43.945Z (over 1 year ago)
- Language: Python
- Size: 1.12 MB
- Stars: 17
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VSColab
Use Google Colab GPU's and TPU's via an ssh connection locally in your device.
[](/LICENSE)

### Installation:
Installation is easy!
```
$ pip install VSColab
```
Using this package we can ssh into the Google Colab instance and also perform remote developement using VSCode.
### What's New in 0.1.4:
- `GetSSH()` function automates the process of getting the Tunnel URL.
### Getting Started:
- Install the package
- Use the `Connect()` function to create an Ngrok tunnel, by passing a password string as a parameter.
- Then Enter the Authentication Key (which can be obtained from:https://dashboard.ngrok.com/auth/your-authtoken) and press Enter.
- To get the ssh command, run the `GetSSH()` function.
- Use the `VSconfig()` function to get the contents for the VSCode Config file, by passing the Tunnel URL (which can be obtained from the `GetSSH()` function).
- To kill the tunnel, use the `Kill()` function.
### Colab starter notebook:
[](https://colab.research.google.com/drive/1tZki6bp9x81jzn05zczR7aK03owsAscd?usp=sharing)
### Remote development with VSCode:
- First create a tunnel using the `Connect()` function.
- Use the `VSconfig()` function to get the contents for the VSCode Config file, by passing the Tunnel URL (which can be obtained from the `GetSSH()` function).
- Then install the **remote-ssh** plugin in VSCode, and click the button at the bottom left corner.
- Then select the **Open Configuration Files..** option and enter the copied text there.
- Then select the **Connect to Host..** option and Enter the password when asked.
- **Viola!! A fully functional Development environment powered by the GPU's and TPU's of Google Colab**



### Note:
If the command `$ nvidia-smi` doesn't work in the ssh session, simply type :
```
export LD_PRELOAD=/usr/lib64-nvidia/libnvidia-ml.so
```
Then press Enter.