Skip to main content

Remote Kernel v1.1

Remote kernel is a pure-python package that sets up an ssh connection with port forwarding to a remote host, and starts up an IPyKernel on that host. This allows a locally running instance of Jupyter or Spyder to easily run code on a remote server. Moreover, this can be installed as a jupyter 'kernel', allowing you to use this just as easily as you would use a local kernel!

Installation

To install remote_kernel, run:

pip install remote-kernel

Usage

Remote kernel is intended to spawn kernels on remote servers for use in both Jupyter notebooks and Spyder.

Jupyter

Install the remote kernel:

python -m remote_kernel install -t <ssh_host> [Options]

To obtain a list of options for the installation, run:

python -m remote_kernel install --help

Spyder

To use the remote kernel in spyder, a kernel needs to be manually started and then connected to from spyder.

To start the remote kernel:

python -m remote_kernel -t <ssh_host> [Options]

Again, options can be listed using:

python -m remote_kernel --help

Alternatively, it is possible to start the remote kernel from a kernel spec file (i.e. what jupyter uses to start kernels):

python -m remote_kernel from-spec <kernel-name>

Here, <kernel-name> is the name of directory containing the kernel.json kernel spec file. If the name is relative, remote_kernel looks for it relative to the current directory, as well as in the jupyter kernel directories, where jupyter kernels are installed as directories with the kernel name.

If successfull, this will print a message like this:

remote_kernel.start I: Remote Kernel started. To connect another client to this kernel, use:
    --existing kernel-<user>@<host>.json

Copy this name (or just the <user>@<host part) and use it to connect to a local existing kernel in spyder. Even though the kernel is running remotely, and we're using SSH, connect to it as if it were running locally (i.e. don't check the SSH box). N.B. The convenience function with the id expansion also works using the <user>@<host> part, even though it's not a number.

N.B. By default, remote_kernel starts regular ipykernels on the remote server, but this can be overridden using the -c command line option.

Acknowledgements/Requirements

This package relies heaviliy on the following packages

  • paramiko, for setting up the ssh connection.
  • sshtunnel, for creating the forwarding tunnels for the kernel ports.

Release files for remote-kernel 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-kernel 1.1
File Size Uploaded
remote_kernel-1.1.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remote-kernel 1.1
File Interpreter ABI Platform
remote_kernel-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.8 kB

Release files / remote_kernel-1.1.tar.gz

Download URL remote_kernel-1.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a8e2492b9e641b6f19bacb90940e93cb41b087526648625e3ddd0145bcd304a7
BLAKE2b-256 checksum
How to use checksums
6cb4050613db251f3ff13b2fb108057110ed921c362a405c1853d0748ddb16b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.5.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.3

Release files / remote_kernel-1.1-py3-none-any.whl

Download URL remote_kernel-1.1-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96940b2a2e524edb753ea91a7f7dbf405807da33f716053ad4d6e4456cda46da
BLAKE2b-256 checksum
How to use checksums
2030b2dd2d4414dad9feb289dcc866f3aedcd5f083d15063c19209af57a9c69f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.5.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.3

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page