Code-server: how to start this from google colab?

Created on 6 Mar 2019  路  9Comments  路  Source: cdr/code-server

Is there any way to run code-server from google colab

Most helpful comment

I have mentioned this issue, but I found this issue's solution after me comments.
@ignitz mentioned that is true, so we can access colab kernel with ngrok.

This code run in colab kernel is the issue's solution.

!wget https://github.com/cdr/code-server/releases/download/2.1688-vsc1.39.2/code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!tar xzvf code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!mv code-server2.1688-vsc1.39.2-linux-x86_64/ ./code
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
get_ipython().system_raw('./ngrok http 6006 &')
!curl -s http://localhost:4040/api/tunnels | python3 -c \
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

# this commands show access url to this colab kernel.

and run code-server.

!code/code-server --host 0.0.0.0 --port 6006
# this command show password

https://xxxxxxxx.ngrok.io has shown in your colab output, and click url and sign in to the code-server.

All 9 comments

code-server can't be run in Jupyter.

Colaboratory can't use this. GCP and AWS can use this. (same as colab performance in GCP, need $60 per month.)

Colaboratory is running by Jupyter-server. And, colab system basically use .ipynb files. This means colab system start up jupyter kernels for each .ipynb files. So I don't have any ideas without google's official support.

But, google support PyTorch which is mainly supported by Facebook team in the history, google might support this code-server.

Hope , google will add support for code server also

Voting to close this as wontfix. We really shouldn't support running via Jupyer (Colab)

Is it certain that this is impossible? Correct me if I'm wrong but I believe clouderizer is able to use google colab instances to host a docker container: https://clouderizer.com/features/#F2?

that is out of scope of this project and we won't support this kind of use case.

Is it certain that this is impossible? Correct me if I'm wrong but I believe clouderizer is able to use google colab instances to host a docker container: https://clouderizer.com/features/#F2?

You can via ngrok (tunnel port), run code-server inside tmux and redirect with another port. That's not a better place to do this, EC2 it's the better option.

I have mentioned this issue, but I found this issue's solution after me comments.
@ignitz mentioned that is true, so we can access colab kernel with ngrok.

This code run in colab kernel is the issue's solution.

!wget https://github.com/cdr/code-server/releases/download/2.1688-vsc1.39.2/code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!tar xzvf code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!mv code-server2.1688-vsc1.39.2-linux-x86_64/ ./code
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
get_ipython().system_raw('./ngrok http 6006 &')
!curl -s http://localhost:4040/api/tunnels | python3 -c \
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

# this commands show access url to this colab kernel.

and run code-server.

!code/code-server --host 0.0.0.0 --port 6006
# this command show password

https://xxxxxxxx.ngrok.io has shown in your colab output, and click url and sign in to the code-server.

I have mentioned this issue, but I found this issue's solution after me comments.
@ignitz mentioned that is true, so we can access colab kernel with ngrok.

This code run in colab kernel is the issue's solution.

!wget https://github.com/cdr/code-server/releases/download/2.1688-vsc1.39.2/code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!tar xzvf code-server2.1688-vsc1.39.2-linux-x86_64.tar.gz
!mv code-server2.1688-vsc1.39.2-linux-x86_64/ ./code
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
get_ipython().system_raw('./ngrok http 6006 &')
!curl -s http://localhost:4040/api/tunnels | python3 -c \
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

# this commands show access url to this colab kernel.

and run code-server.

!code/code-server --host 0.0.0.0 --port 6006
# this command show password

https://xxxxxxxx.ngrok.io has shown in your colab output, and click url and sign in to the code-server.

https://colab.research.google.com/github/biplobsd/OneClickRun/blob/master/OneClickRun.ipynb#scrollTo=HsvEZZy0hrp6

This is my notebook. Maybe it's help you more!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RealSlimMahdi picture RealSlimMahdi  路  3Comments

pchecinski picture pchecinski  路  3Comments

tecosaur picture tecosaur  路  3Comments

balazssoltesz picture balazssoltesz  路  3Comments

avelino picture avelino  路  3Comments