Skip to content
Snippets Groups Projects
Unverified Commit 85caf135 authored by Ravi Tripathi's avatar Ravi Tripathi Committed by GitHub
Browse files

Merge pull request #1 from diedpigs/feat-jupyterlab

Feat jupyterlab
parents 529917c0 6315113d
No related branches found
No related tags found
No related merge requests found
# Batch Connect - Example Jupyter Notebook Server
# Batch Connect - JupyterLab
![GitHub Release](https://img.shields.io/github/release/osc/bc_example_jupyter.svg)
![GitHub License](https://img.shields.io/github/license/osc/bc_example_jupyter.svg)
An example Batch Connect app that launches a Jupyter Notebook server within a
An example Batch Connect app that launches a JupyterLab within a
batch job.
## Prerequisites
......@@ -12,9 +12,9 @@ This Batch Connect app requires the following software be installed on the
**compute nodes** that the batch job is intended to run on (**NOT** the
OnDemand node):
- [Jupyter Notebook](http://jupyter.readthedocs.io/en/latest/) 4.2.3+ (earlier
- [JupyterLab](http://jupyterlab.readthedocs.io/en/latest/) 3.2.1 (earlier
versions are untested but may work for you)
- [OpenSSL](https://www.openssl.org/) 1.0.1+ (used to hash the Jupyter Notebook
- [OpenSSL](https://www.openssl.org/) 1.0.1+ (used to hash the JupyterLab
server password)
**Optional** software:
......@@ -22,7 +22,7 @@ OnDemand node):
- [Lmod](https://www.tacc.utexas.edu/research-development/tacc-projects/lmod)
6.0.1+ or any other `module purge` and `module load <modules>` based CLI
used to load appropriate environments within the batch job before launching
the Jupyter Notebook server.
the JupyterLab.
## Install
......@@ -34,16 +34,16 @@ this.
```sh
# Download the zip from the GitHub page
wget https://github.com/OSC/bc_example_jupyter/archive/master.tar.gz
wget https://github.com/uabrc/ood_jupyterlab/archive/master.tar.gz
# Create a catchy directory
mkdir my_jupyter_app
mkdir my_jupyterlab_app
# Unzip the downloaded file into this directory
tar xzvf master.tar.gz -C my_jupyter_app --strip-components=1
tar xzvf master.tar.gz -C my_jupyterlab_app --strip-components=1
# Change the working directory to this new directory
cd my_jupyter_app
cd my_jupyterlab_app
```
From here you will make any modifications to the code that you would like and
......
......@@ -8,15 +8,15 @@
# under /etc/ood/config/clusters.d/*.yml
# @example Use the Owens cluster at Ohio Supercomputer Center
# cluster: "owens"
cluster: "SLURM_CLUSTER"
cluster: "SLURM_CLUSTER"
# Title of the app displayed in the Dashboard
title: "Jupyter Notebook"
title: "JupyterLab"
# Description of the app displayed in the Dashboard (can use multi-line string
# and Markdown syntax)
description: |
This app will launch a Jupyter Notebook server on one or more cores.
This app will launch a JupyterLab server on one or more cores.
# Define attribute values that aren't meant to be modified by the user within
# the Dashboard form
......@@ -44,7 +44,7 @@ attributes:
# format:
# module load example_module/VERSION example_module2
# Whether Conda extensions will be available within the Jupyter notebook
# Whether Conda extensions will be available within the JupyterLab
# server
#
# @note Allows the user to use conda environment-based kernels from their
......@@ -56,11 +56,11 @@ attributes:
# @see https://docs.continuum.io/anaconda/user-guide/tasks/use-jupyter-notebook-extensions
conda_extensions: "1"
# Any extra command line arguments to feed to the `jupyter notebook ...`
# command that launches the Jupyter notebook within the batch job
# Any extra command line arguments to feed to the `jupyter-lab ...`
# command that launches the JupyterLab within the batch job
extra_jupyter_args:
widget: text_field
label: Extra jupyter arguments
label: Extra JupyterLab arguments
bc_num_hours:
value: 1
......
icon.png

12.5 KiB | W: | H:

icon.png

34.8 KiB | W: | H:

icon.png
icon.png
icon.png
icon.png
  • 2-up
  • Swipe
  • Onion skin
---
name: Jupyter Notebook
name: JupyterLab
category: Interactive Apps
subcategory: Servers
role: batch_connect
description: |
This app will launch a Jupyter Notebook server on one or more nodes.
This app will launch a JupyterLab server on one or more nodes.
......@@ -4,10 +4,10 @@
cd "${HOME}"
module reset
#
# Start Jupyter Notebook Server
# Start JupyterLab Server
#
module load Anaconda3
<%= context.custom_environment %>
unset XDG_RUNTIME_DIR
# Launch the Jupyter Notebook Server
jupyter notebook --config="${CONFIG_FILE}" <%= context.extra_jupyter_args %>
# Launch the JupyterLab Server
jupyter-lab --config="${CONFIG_FILE}" <%= context.extra_jupyter_args %>
<form action="/node/<%= host %>/<%= port %>/login" method="post" target="_blank">
<input type="hidden" name="password" value="<%= password %>">
<button class="btn btn-primary" type="submit">
<i class="fas fa-eye"></i> Connect to Jupyter
<i class="fas fa-eye"></i> Connect to JupyterLab
</button>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment