demotomohiro / remocolab

remocolab is a Python module to allow remote access to Google Colaboratory using SSH or TurboVNC.
MIT License
316 stars 229 forks source link

Colab Gets disconnected everytime when trying to install this #94

Open Nirzak opened 3 years ago

Nirzak commented 3 years ago

There might be a hint to solve your problem in FAQ

Describe the bug Whenever I am trying to install this the script takes a huge time almost like 6-7 minutes and then colab automatically disconnected and the installation aborted. You have made the installation a huge actually by including nvidea GPU drivers. I think colab actively blocking this script now. That's why we're getting disconnected.

demotomohiro commented 3 years ago

I have tested remocolab.setupVNC(tunnel = "argotunnel", public_key = "...") on GPU type colab runtime and it worked. I have used remote desktop for about 10 minutes. I don't think colab is blocking remocolab now.

Maybe you got this issue https://github.com/demotomohiro/remocolab/issues/88. Do you still get disconnected?

Try following Python code on new cell on google colab without running remocolab. It prints elapsed time every 10 seconds.

import time

begin = time.time()
for i in range(30 * 6):
  time.sleep(10)
  print(time.time() - begin)

If you get disconnected within 10 minutes, it is the problem of google colab, not remocolab.

Nirzak commented 3 years ago

Later it worked. But I didn't understand one thing. "Execute the following command before running VNC" where should I execute that command? I have tried to execute that on powershell as I am a windows user.

demotomohiro commented 3 years ago

I also use windows and I usually use command prompt, not powershell. But that command should also works on powershell as long as SSH is installed on your PC. That ssh command do local port forwarding and secures TurboVNC connection. After login to the server, run TurboVNC viewer on your local machine.