Google Colab Secure Shell connector that automates Ngrok tunnels creation (for SSH, TPU, TensorBoard, etc.) and facilitates Kaggle API data downloads.
Reason this release was yanked:
wrong Python directory name
Project description
ssh-Colab
ssh-Colab is a Python module to facilitate remote access to Google Colaboratory (Colab) through Secure Shell (SSH) connections, secured by a third-party software, ngrok. ssh-Colab automates the tedious routine to set up ngrok tunnels needed for TPU runtime applications and services like TensorBoard. It also includes the function to facilitate the routine of Kaggle API installation/authentication and competition data downloads.
Prerequisites
- ngrok tunnel authtoken.
- Google account to access a Colab notebook.
- Local code editors such as VS Code or PyCharm to make the most of coding on Colab.
Usage
-
Launch a Colab notebook. Choose a runtime type you prefer.
-
Install ssh-Colab. Type and run the following command in a notebook cell:
!pip install ssh-Colab
-
Initiate the establishment of tunnels:
import ssh-Colab ssh-Colab.connect()
The default TensorBoard log directory is
/log/fit
. You can reset it by passing intoconnect()
the new valueLOG_DIR=/new/path/to/log
. -
Retrieve information that is used for establishing the SSH connection:
ssh-Colab.info()
If you are using non-TPU runtimes, the setup instruction of TPU resolver is ignored.
-
Run function
kaggle()
to automate Kaggle API installation/authentication and data downloads. The data is unzipped to the destination folder/kaggle/input
.ssh-Colab.kaggle([data='name-of-competition'])
Note that the default competition name is "tabular-playground-series-mar-2021."
-
To disable ngrok tunnels created, run the command below:
ssh-Colab.kill()
Quickstart
A quickstart Colab notebook template is provided in the link below. Users can find a simple end-to-end application starting from SSH-Colab installation, SSH tunnel creation, to the use of TensorBoard after training a 3-layer MNIST convolutional neural network.
What's missed in this quickstart is how to may our way to Colab instances from local machines. The reference listed below can be a start point for interested users:
Feedback
Comments and suggestions are welcome and appreciated. They can be sent to lipin.juan02@gmail.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ssh-Colab-0.1.1.tar.gz
.
File metadata
- Download URL: ssh-Colab-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f71c3bf6c8604ca25805bb57ff443eb77e7c3ce5b0bd06fab6b700acc19bc4 |
|
MD5 | 91d800198d7f7d36a6b5547376dfb354 |
|
BLAKE2b-256 | cf05f69199650fe450d24199da56ff4cf446dfe1d493594452b8463b39fd4144 |
File details
Details for the file ssh_Colab-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: ssh_Colab-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5905f72fbe64d4f713756e377f6482a3502e4bb1ec23bc8892801ab5af859b |
|
MD5 | d9d6ba80e569afdc8fc499f8b827f2aa |
|
BLAKE2b-256 | 8ded1bcb3105e0b86d934cb96b136a60d207092e1b82dfdfb5e53eddb3fded87 |