All Projects → lamhoangtung → colab_ssh

lamhoangtung / colab_ssh

Licence: MIT license
Create SSH tunel to a running colab notebook

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to colab ssh

keras-buoy
Keras wrapper that autosaves what ModelCheckpoint cannot.
Stars: ✭ 22 (-54.17%)
Mutual labels:  colab
Fastai
The fastai deep learning library
Stars: ✭ 21,718 (+45145.83%)
Mutual labels:  colab
MineColab
Run Minecraft Server on Google Colab.
Stars: ✭ 135 (+181.25%)
Mutual labels:  colab
Persian-Sentiment-Analyzer
Persian sentiment analysis ( آناکاوی سهش های فارسی | تحلیل احساسات فارسی )
Stars: ✭ 30 (-37.5%)
Mutual labels:  colab
Pyprobml
Python code for "Machine learning: a probabilistic perspective" (2nd edition)
Stars: ✭ 4,197 (+8643.75%)
Mutual labels:  colab
marltoolbox
A toolbox with the goal of speeding up research on bargaining in MARL (cooperation problems in MARL).
Stars: ✭ 25 (-47.92%)
Mutual labels:  colab
fastai-visual-guide
Notebooks for Fastai Viusal Guide
Stars: ✭ 25 (-47.92%)
Mutual labels:  colab
Numerical-Analysis-Python
Python notebooks for Numerical Analysis
Stars: ✭ 82 (+70.83%)
Mutual labels:  colab
Lucid
A collection of infrastructure and tools for research in neural network interpretability.
Stars: ✭ 4,344 (+8950%)
Mutual labels:  colab
fiap-ml-visao-computacional
Repositório dos exemplos e desafios utilizados na disciplina de Visão Computacional do curso de MBA Machine Learning da FIAP
Stars: ✭ 33 (-31.25%)
Mutual labels:  colab
video coloriser
Pytorch Convolutional Neural Net and GAN based video coloriser that converts black and white video to colorised video.
Stars: ✭ 29 (-39.58%)
Mutual labels:  colab
Artline
A Deep Learning based project for creating line art portraits.
Stars: ✭ 3,061 (+6277.08%)
Mutual labels:  colab
TFLite-ModelMaker-EfficientDet-Colab-Hands-On
TensorFlow Lite Model Makerで物体検出を行うハンズオン用資料です(Hands-on for object detection with TensorFlow Lite Model Maker)
Stars: ✭ 15 (-68.75%)
Mutual labels:  colab
steam-stylegan2
Train a StyleGAN2 model on Colaboratory to generate Steam banners.
Stars: ✭ 30 (-37.5%)
Mutual labels:  colab
Torrent-To-Google-Drive-Downloader
Simple notebook to stream torrent files to Google Drive using Google Colab and python3.
Stars: ✭ 256 (+433.33%)
Mutual labels:  colab
Google-Colab-Tutorial
Google Colab Tutorial
Stars: ✭ 61 (+27.08%)
Mutual labels:  colab
dimensions-api-lab
Research data analytics tutorials using the Dimensions Analytics API
Stars: ✭ 68 (+41.67%)
Mutual labels:  colab
edge-computer-vision
Edge Computer Vision Course
Stars: ✭ 41 (-14.58%)
Mutual labels:  colab
AnimeGANv3
Use AnimeGANv3 to make your own animation works, including turning photos or videos into anime.
Stars: ✭ 878 (+1729.17%)
Mutual labels:  colab
ALPS 2021
XAI Tutorial for the Explainable AI track in the ALPS winter school 2021
Stars: ✭ 55 (+14.58%)
Mutual labels:  colab

Colab SSH

Create SSH tunel to a running colab notebook

PyPI version Downloads build_status codecov license

Prerequisite

  • This package only allow SSH public key authentication so you will need to prepare once. You might already had one at ~/.ssh/id_rsa.pub. Refer this to create a new one if you don't had once already
  • In order to connect to the SSH tunel from your machine, you will need to install cloudflared from here

Usage

Create a new Colab notebook with a single cell with the following content:

!pip3 install linus-colab-ssh

from colab_ssh import setup_ssh, loop_forever

public_key = '<YOUR_PUBLIC_SSH_KEY>'
setup_ssh(public_key)
loop_forever()

You can use list of public key or link to a raw text file of authorized_keys like this as well

Optinally, you can also specify a Mattermost Webhook URL with mattermost_webhook_address when calling setup_ssh to send a push notification to your Mattermost channel when the SSH tunel is ready.

Run it, after about 2 minutes, you will see something like this:

Command to connect to the ssh server:
✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️
ssh -o UserKnownHostsFile=/dev/null -o VisualHostKey=yes -oProxyCommand="cloudflared access ssh --hostname %h" [email protected]
✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️
Or you can use the following configuration in your .ssh/config file:
✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️
Host colab
	HostName economic-singapore-place-obtaining.trycloudflare.com
	User root
	UserKnownHostsFile /dev/null
	VisualHostKey yes
	StrictHostKeyChecking no
	ProxyCommand cloudflared access ssh --hostname %h
✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️✂️```

Then voila ;)

Please noted that you must keep the kernel webpage connected to avoid Colab disconnect your kernel early.

Disclaimer

This repo contains many of the configuration that I use for my day to day work so it might not be the best for you.

If you had any problems using this, feel free to open an issue. Otherwise, I highly recommend you to fork this repo and did some necessary modification for yourself. Thanks for checking by

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].