abhishekkrthakur / colabcode

Run VSCode (codeserver) on Google Colab or Kaggle Notebooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kaggle has started banning colabcode juypterlab

kuro7766 opened this issue · comments

It seems that kaggle also starts to ban colabcode juypterlab. Notebook kernel will shutdown when installing jupyter related pip dependencies.

Damn. My research has come to a COMPLETE stop because of this. I was really hoping this wasn't the case. I am facing the same issue from the last 3 days. This is very sad. My whole research depends on this library !!!

Using colabcode was a huge pivotal moment in my AI research. Using kaggle cells sucks!! I cant create production level code using kaggle cells.

Any other workaround?

I think there may be an alternative method using VS Code containers?
here: https://towardsdatascience.com/how-to-kaggle-the-engineer-way-act-1-vs-code-containers-b3279970c029
here: https://code.visualstudio.com/docs/remote/containers

I solved it with code-server and pyngrok

  1. Install Code-server
!curl -fsSL https://code-server.dev/install.sh | sh
  1. Install pyngrok & get the tunnel URL (you can't run background process in kaggle)
!pip install pyngrok
  1. Input ngrok auth token and get tunnel http 80.
from pyngrok import conf, ngrok

conf.get_default().auth_token = "<YOUR TOKEN>"

http_tunnel = ngrok.connect()
ssh_tunnel = ngrok.connect(80, "http")
  1. Get the tunnel URL
from pyngrok import ngrok

# [<NgrokTunnel: "http://<public_sub>.ngrok.io" -> "http://localhost:80">]
tunnels = ngrok.get_tunnels()
tunnels
  1. Get code-server default password
!cat  ~/.config/code-server/config.yaml
  1. run code-server
!code-server --port 80

Hopefully this workaround will work for a while.

Does this work still?

commented

Does this work still?

this still work , thanks/🥰

@hongvin you are a hero, thanks