Skip to content
Snippets Groups Projects
form.yml.erb 3.69 KiB
Newer Older
<%-
  partitions = OodAppkit.clusters[:SLURM_CLUSTER].custom_config[:partitions]
-%>
Jeremy Nicklas's avatar
Jeremy Nicklas committed
# Batch Connect app configuration file
#
# @note Used to define the submitted cluster, title, description, and
#   hard-coded/user-defined attributes that make up this Batch Connect app.
---

# **MUST** set cluster id here that matches cluster configuration file located
# under /etc/ood/config/clusters.d/*.yml
# @example Use the Owens cluster at Ohio Supercomputer Center
#     cluster: "owens"
cluster: "SLURM_CLUSTER"

# Title of the app displayed in the Dashboard
title: "JupyterLab Singularity"

# Description of the app displayed in the Dashboard (can use multi-line string
# and Markdown syntax)
description: |
  This app will launch a JupyterLab server on one or more cores from a given Singularity container.
Jeremy Nicklas's avatar
Jeremy Nicklas committed

# Define attribute values that aren't meant to be modified by the user within
# the Dashboard form
attributes:
  # Set the corresponding modules that need to be loaded for Jupyter to run
  #
  # @note It is called within the batch job as `module load <modules>` if
  #   defined
  # @example Do not load any modules
  #     modules: ""
  # @example Using default python module
  #     modules: "python"
  # @example Using specific python module
  #     modules: "python/3.5"
  # @example Using combination of modules
  #     modules: "python/3.5 cuda/8.0.44"
  custom_environment:
    widget: text_area
    label: Environment Setup
    value: |
      # load any other modules you may need here such as CUDA
      # DO NOT LOAD Anaconda3 or Singularity, these are already 
      # taken care of
  # Whether Conda extensions will be available within the JupyterLab
  # 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"
Jeremy Nicklas's avatar
Jeremy Nicklas committed

  # User needs to set the path to the container
  container_path:
    widget: text_field
    label: Path to Container File

  # Any extra command line arguments to pass to `singularity exec ...`
  extra_singularity_args:
    widget: text_field
    label: Extra Singularity arguments

  # 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 JupyterLab arguments
    widget: "number_field"
    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

    widget: "number_field"
    label: Number of GPUs
    value: 1
  bc_partition:
    widget: select
    label: Partition
    options:
    <%- partitions.each do |p| -%>
      - [ "<%= p %>", "<%= p %>" ]
    <%- end -%>
Jeremy Nicklas's avatar
Jeremy Nicklas committed
# 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
# files
#
# @note You typically do not need to modify this unless you want to add a new
#   configurable value
# @note If an attribute listed below is hard-coded above in the `attributes`
#   option, then it will not appear in the form page that the user sees in the
#   Dashboard
form:
  - custom_environment
  - conda_extensions
  - container_path
  - extra_singularity_args
Jeremy Nicklas's avatar
Jeremy Nicklas committed
  - extra_jupyter_args
  - bc_num_hours
  - bc_num_slots
Jeremy Nicklas's avatar
Jeremy Nicklas committed
  - bc_email_on_started