Use Google Colab GPU's and TPU's via an ssh connection locally in your device.
Installation is easy!
$ pip install VSColab
Using this package we can ssh into the Google Colab instance and also perform remote developement using VSCode.
- Install the package
- Use the
VSColab.Connect('type-password-here')
function to create an Ngrok tunnel. - Then Enter the Authentication Key (which can be obtained from:https://dashboard.ngrok.com/auth/your-authtoken) and press Enter.
- Copy paste the ssh command in terminal/cmd
- To kill the tunnel, use the
VSColab.Kill()
function.
- First create a tunnel using the
Connect()
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
If the command $ nvidia-smi
doesn't work in the ssh session, simple type :
export LD_PRELOAD=/usr/lib64-nvidia/libnvidia-ml.so
Then press Enter.