Giter Site home page Giter Site logo

jump's Introduction

jump

Conda Version Conda Downloads

Jump simplifies the process of starting and connecting to remote jupyter notebook servers. It support the creation of new notebook servers, as well as connecting to existing ones. It also supports the use of remote environments, such as conda/mamba or virtualenv environments. It can be very useful in particular when the connection to the remote machine is unstable.

Free software: MIT license

Installation

With conda/mamba:

conda install -c conda-forge jump

with pip:

python -m pip install jump

Getting Started

After the installation the executable jump should be available in your path. To open a new session on a remote machine using a conda enviroment, type

jump --env-type conda REMOTEMACHINE

Features

  • Start a new notebook server on a remote machine
  • Connect to an existing notebook server on a remote machine
  • Support for conda/mamba and virtualenv environments
  • Support for jupyter lab
  • Support for killing a notebook server

For options, type

jump --help

Warning Jump do not kill automatically your sessions. Closing the browser tab will not kill the session on the server. You have to kill the session manually using the kill action. This feature is useful if your connection to the remote machine drops. In that case you only need to attach your session again.

Examples

Starting a new notebook server in remote virtual environment myenv on a remote machine REMOTEMACHINE (start at the end is optional)

jump --env-type virtualenv --env-name myenv REMOTEMACHINE start

Starting a new jupyter lab server in remote conda environment myenv on a remote machine REMOTEMACHINE

jump --env-type conda --env-name myenv REMOTEMACHINE start --lab

Listing all the running notebook servers on a remote machine REMOTEMACHINE

jump --env-type mamba --env-name myenv REMOTEMACHINE list

Connecting to an existing jupyter server

jump --env-type conda --env-name myenv REMOTEMACHINE attach

Starting a new notebook server with remote module cuda/9.2 loaded for GPU support

jump --env-type conda --env-name -m cuda/9.2 REMOTEMACHINE start

Killing a notebook server

jump --env-type conda --env-name myenv REMOTEMACHINE kill

Killing all notebook servers

jump  --env-type conda --env-name myenv REMOTEMACHINE kill --all

Requirements

On local (UNIX) machine:

  • plumbum and click (are installed automatically)
  • ssh

On remote machine:

  • anaconda/miniconda or mamba/micromamba or a virtualenv
  • jupyter notebook (at least installed in one environment, jupyter > 5.1 required for the kill action)
  • jupyter lab (to support the --lab option)

Windows systems are not supported.

Efficient SSH Setup

In order to use this script efficiently, it is desirable to have an efficient setup in your ~/.ssh/config file.

Concretely, you should prevent your ssh connection from prompting for a password everytime you rune a local command, like this:

Host *
    ControlMaster auto
    ControlPath /tmp/ssh_mux_%h_%p_%r
    ControlPersist 60m
    ServerAliveInterval 90

Furthermore, you will want to set up shortcuts for the servers that you use most often:

Host YOUR_SHORTCUT
    HostName FULL_REMOTE_NAME
    DynamicForward 8080
    User YOUR_USER_NAME_ON_THE_REMOTE`

If you have remotes that require tunneling through a login node, you may also want to define those remotes explicitly:

Host NAME_OF_REMOTE
    ProxyCommand ssh FULL_LOGIN_NODE_NAME_OR_SHORTCUT -W %h:%p

jump's People

Contributors

dependabot[bot] avatar olllom avatar wiso avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wiso

jump's Issues

Help

I try set up jump but ssh always break my pipe. What wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.