Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ attributes:
# modules: "python/3.5 cuda/8.0.44"
modules: "python"

extra_modules_script:
label: Extra modules script
help: If you'd like to load additional modules alongside jupyterhub, put the 'module load ...' commands into a text file (one 'module load...' per line) and specify its path here
widget: text_field
required: false


# Any extra command line arguments to feed to the `jupyter notebook ...`
# command that launches the Jupyter notebook within the batch job
extra_jupyter_args: ""
Expand All @@ -42,6 +49,7 @@ attributes:
# Dashboard
form:
- modules
- extra_modules_script
- extra_jupyter_args
- bc_account
- bc_queue
Expand Down
6 changes: 6 additions & 0 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ module load <%= context.modules %>
module list
<%- end -%>

<%- unless context.extra_modules_script.blank? -%>
if [[ -f <%= context.extra_modules_script %> ]]; then
source <%= context.extra_modules_script %>
fi
<%- end -%>

# Benchmark info
echo "TIMING - Starting jupyter at: $(date)"

Expand Down