Skip to content

Commit be75ff3

Browse files
authored
allow for notebook (#123)
1 parent b56e3d9 commit be75ff3

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

template/before.sh.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,7 @@ if [[ ${WORKSPACE_FILE+x} ]]; then
4343
cp $WORKSPACE_FILE .
4444
fi
4545

46-
<%-
47-
api = if context.auto_modules_app_jupyter.split('/')[1].to_s > '4.0' || context.mode == "1"
48-
'lab'
49-
else
50-
'tree'
51-
end
52-
-%>
53-
54-
JUPYTER_API="<%= api %>"
46+
JUPYTER_API="<%= context.mode == "1" ? 'lab' : 'tree' %>"
5547

5648
export JUPYTERLAB_WORKSPACES_DIR=$PWD
5749
export jupyter_api="$JUPYTER_API"

template/script.sh.erb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
#!/usr/bin/env bash
2-
<%-
3-
require 'pathname'
4-
5-
subcommand = if context.auto_modules_app_jupyter.split('/')[1].to_s > '4.0' || context.mode == "1"
6-
'lab'
7-
else
8-
'notebook'
9-
end
10-
-%>
112

123
echo "Starting main script..."
134
echo "TTT - $(date)"
@@ -44,4 +35,4 @@ echo "TTT - $(date)"
4435

4536
# Launch the Jupyter server
4637
set -x
47-
jupyter <%= subcommand %> --config="${CONFIG_FILE}"
38+
jupyter <%= context.mode == "1" ? 'lab' : 'notebook' %> --config="${CONFIG_FILE}"

0 commit comments

Comments
 (0)