Jupyter Lab Port Forwarding Utility
Project description
jupyter-forward
Badges
CI | |
---|---|
Docs | |
Package | |
License |
Overview
Jupyter-forward simplifies the process of running jupyter lab
on a remote machine by performing the following tasks on behalf of the users:
- Log into a remote cluster/resource via the SSH protocol.
- Launch Jupyter Lab on the remote cluster.
- Port forward Jupyter Lab session back to your local machine!
- Opening the port forwarded Jupyter Lab session into your local browser
Usage
❯ jupyter-forward --help
Usage: jupyter-forward [OPTIONS] COMMAND [ARGS]...
Jupyter Lab Port Forwarding Utility
Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
Commands:
end Stops the running Jupyter Lab server.
resume Resumes an already running remote Jupyter Lab session.
start Starts Jupyter lab on a remote resource and port forwards session...
Launching Jupyter Lab on a Remote Cluster
jupyter-forward
provides functionality to launch a jupyter lab session on a remote cluster via the start
command:
❯ jupyter-forward start --help
Usage: jupyter-forward start [OPTIONS] HOST
Starts Jupyter lab on a remote resource and port forwards session to local
machine.
Arguments:
HOST [required]
Options:
--port INTEGER The local port the remote notebook server
will be forwarded to. If not specified,
defaults to 8888. [default: 8888]
--conda-env TEXT Name of conda environment on the remote host
that contains jupyter lab
--notebook-dir TEXT The directory on the remote host to use for
notebooks
--port-forwarding / --no-port-forwarding
Whether to set up SSH port forwarding or not
[default: True]
-i, --identity PATH Selects a file from which the identity
(private key) for public key authentication
is read.
-c, --launch-command TEXT Custom command to run before launching
Jupyter Lab. For instance: "qsub -q regular
-l select=1:ncpus=36,walltime=00:05:00 -A
AABD1115"
--help Show this message and exit.
Note: The start
command will prompt you for your password.
Running on a Remote Host's Head Node
For instance, here is how to start a jupyter lab server running on port 9999 on one of Cheyenne's login nodes:
❯ jupyter-forward start mariecurie@cheyenne.ucar.edu
Running on a Remote Host's Compute Node
To launch jupyter lab
on a remote host's compute node, the user needs to specify the --launch-command
option. The launch command is meant to submit a job on the remote host's queueing system. Once the job is up and running, jupyter lab
is launched on the compute node and the session is port-forwarded to the user's local machine.
Here is a couple examples:
- Launch Jupyter Lab on a remote system that uses PBS job scheduler
❯ jupyter-forward start mariecurie@cheyenne.ucar.edu --launch-command "qsub -q regular -l select=1:ncpus=36,walltime=00:05:00 -A AABD1115"
- Launch Jupyter Lab on a remote system that uses Slurm job scheduler
❯ jupyter-forward start mariecurie@casper.ucar.edu --launch-command "sbatch -A AABD1115 -t 00:05:00"
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 jupyter-forward-2020.10.22.1.tar.gz
.
File metadata
- Download URL: jupyter-forward-2020.10.22.1.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af237e9b433c0683fd0889e3b147410cd9779024c63077b87ec60a92163aee0f |
|
MD5 | b651e3905e1916f4849c0b8bf4741b91 |
|
BLAKE2b-256 | 1201201cd71cec9e8af6b59438bb7726658ca94027bfaf0e1b4d370d4eadbb93 |
Provenance
File details
Details for the file jupyter_forward-2020.10.22.1-py3-none-any.whl
.
File metadata
- Download URL: jupyter_forward-2020.10.22.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92639a5f611bac33ace25496d229e3551fcbe5479563d62fb33e79592372e04f |
|
MD5 | 5e6570cbe7592a1df5cd4f01fb6f8889 |
|
BLAKE2b-256 | 8a42062ff3eb8d3fad9120ad5b0226946af2e47ee549397c3f705ae565b37633 |