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

Merge pull request #1 from krishmoodbidri/v1

tag V1
parents 94d29b4b 062d7b6e
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,15 @@ ...@@ -8,7 +8,15 @@
# under /etc/ood/config/clusters.d/*.yml # under /etc/ood/config/clusters.d/*.yml
# @example Use the Owens cluster at Ohio Supercomputer Center # @example Use the Owens cluster at Ohio Supercomputer Center
# cluster: "owens" # cluster: "owens"
cluster: "" cluster: "SLURM_CLUSTER"
# Title of the app displayed in the Dashboard
title: "Jupyter Notebook"
# 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.
# Define attribute values that aren't meant to be modified by the user within # Define attribute values that aren't meant to be modified by the user within
# the Dashboard form # the Dashboard form
...@@ -25,11 +33,67 @@ attributes: ...@@ -25,11 +33,67 @@ attributes:
# modules: "python/3.5" # modules: "python/3.5"
# @example Using combination of modules # @example Using combination of modules
# modules: "python/3.5 cuda/8.0.44" # modules: "python/3.5 cuda/8.0.44"
modules: "python" custom_environment:
widget: text_area
label: Environment Setup
value: |
# The latest version of Anaconda3 with jupyter is loaded by default.
# If you would like to load other modules
# or use specific version of Anaconda please list below
#
# format:
# module load example_module/VERSION example_module2
# Whether Conda extensions will be available within the Jupyter notebook
# server
#
# @note Allows the user to use conda environment-based kernels from their
# Jupyter notebook dashboard
# @example Do NOT allow Conda extensions to be used
# conda_extensions: "0"
# @example Do allow Conda extensions to be used
# conda_extensions: "1"
# @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 ...` # Any extra command line arguments to feed to the `jupyter notebook ...`
# command that launches the Jupyter notebook within the batch job # command that launches the Jupyter notebook within the batch job
extra_jupyter_args: "" extra_jupyter_args:
widget: text_field
label: Extra jupyter arguments
bc_num_hours:
value: 1
bc_num_slots:
label: Number of CPU
value: 1
min: 1
max: 24
step: 1
bc_num_mems:
widget: "number_field"
label: Memory per CPU (GB)
value: 4
min: 1
max: 128
step: 1
bc_partition:
widget: select
label: Partition
options:
- [ "express", "express" ]
- [ "short", "short" ]
- [ "medium", "medium" ]
- [ "long", "long" ]
- [ "interactive", "interactive" ]
- [ "pascalnodes", "pascalnodes" ]
- [ "pascalnodes-medium", "pascalnodes-medium" ]
- [ "largemem", "largemem" ]
- [ "largemem-long", "largemem-long" ]
- [ "amd-hdr100", "amd-hdr100" ]
# All of the attributes that make up the Dashboard form (in respective order), # All of the attributes that make up the Dashboard form (in respective order),
# and made available to the submit configuration file and the template ERB # and made available to the submit configuration file and the template ERB
...@@ -41,10 +105,11 @@ attributes: ...@@ -41,10 +105,11 @@ attributes:
# option, then it will not appear in the form page that the user sees in the # option, then it will not appear in the form page that the user sees in the
# Dashboard # Dashboard
form: form:
- modules - custom_environment
- conda_extensions
- extra_jupyter_args - extra_jupyter_args
- bc_account
- bc_queue
- bc_num_hours - bc_num_hours
- bc_partition
- bc_num_slots - bc_num_slots
- bc_num_mems
- bc_email_on_started - bc_email_on_started
#!/bin/bash -l
# Set working directory to home directory
cd "${HOME}"
module reset
#
# Start Jupyter Notebook 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 %>
# Job submission configuration file # Job submission configuration file
# #
--- ---
# This config comes from below URL
# https://github.com/OSC/bc_example_jupyter/blob/custom_environment/submit.yml.erb
# The -C option in the config provided for slurm has been removed because it does
# not apply to implementation at UAB. We do not use constraint list to be used with -C.
#
# Configure the content of the job script for the batch job here
# @see http://www.rubydoc.info/gems/ood_core/OodCore/BatchConnect/Template
#
batch_connect: batch_connect:
# We use the basic web server template for generating the job script
#
# @note Do not change this unless you know what you are doing!
template: "basic" template: "basic"
# You can override the command used to query the hostname of the compute node script:
# here native:
# - "-N 1"
# @note It is **highly** recommended this be set in the global cluster - "-n <%= bc_num_slots.blank? ? 1 : bc_num_slots.to_i %>"
# configuration file so that all apps can take advantage of it by default - "--mem-per-cpu=<%= bc_num_mems.blank? ? 4 : bc_num_mems.to_i %>G"
# - "--partition=<%= bc_partition %>"
#set_host: "host=$(hostname -A | awk '{print $2}')" - "--time=<%= bc_num_hours.blank? ? 1 : bc_num_hours.to_i %>:00:00"
- "--job-name=ood-jupyter"
# <%- if bc_partition.include? "pascalnodes" -%>
# Configure the job script submission parameters for the batch job here - "--gres=gpu:1"
# @see http://www.rubydoc.info/gems/ood_core/OodCore/Job/Script <%- end -%>
#
#script:
# queue_name: "queue1"
# accounting_id: "account1"
# email_on_started: true
# native: # ... array of command line arguments ...
<form action="/node/<%= host %>/<%= port %>/login" method="post" target="_blank"> <form action="/node/<%= host %>/<%= port %>/login" method="post" target="_blank">
<input type="hidden" name="password" value="<%= password %>"> <input type="hidden" name="password" value="<%= password %>">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fa fa-eye"></i> Connect to Jupyter <i class="fas fa-eye"></i> Connect to Jupyter
</button> </button>
</form> </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