Skip to content

how to start this from google colab? #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xeron56 opened this issue Mar 6, 2019 · 9 comments
Closed

how to start this from google colab? #40

xeron56 opened this issue Mar 6, 2019 · 9 comments

Comments

@xeron56
Copy link

xeron56 commented Mar 6, 2019

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

@sr229
Copy link
Contributor

sr229 commented Mar 6, 2019

code-server can't be run in Jupyter.

@shamoji101
Copy link

shamoji101 commented Mar 7, 2019

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.

@xeron56
Copy link
Author

xeron56 commented Mar 7, 2019

Hope , google will add support for code server also

@sr229
Copy link
Contributor

sr229 commented Mar 7, 2019

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

@nhooyr nhooyr added the wontfix label Mar 8, 2019
@nhooyr nhooyr closed this as completed Mar 8, 2019
@jumerckx
Copy link

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?

@sr229
Copy link
Contributor

sr229 commented Apr 20, 2019

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

@ignitz
Copy link

ignitz commented Oct 25, 2019

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.

@shamoji101
Copy link

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.

@biplobsd
Copy link

biplobsd commented Jun 2, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants