Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ssh_scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sofiane Bendoukha
ssh_scripts
Commits
c0f01291
Commit
c0f01291
authored
4 years ago
by
Sofiane Bendoukha
Browse files
Options
Downloads
Patches
Plain Diff
Enable starting jupyter notebook on different frontend.
parent
306c1096
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+9
-1
9 additions, 1 deletion
README.md
start-jupyter
+12
-6
12 additions, 6 deletions
start-jupyter
with
21 additions
and
7 deletions
README.md
+
9
−
1
View file @
c0f01291
...
@@ -6,4 +6,12 @@ tunnel set-up, and start the client application on your local system.
...
@@ -6,4 +6,12 @@ tunnel set-up, and start the client application on your local system.
As bash scripts they run natively on Linux, MacOS, and other Unix-like
As bash scripts they run natively on Linux, MacOS, and other Unix-like
systems. After installing WSL (Windows Subsystem for Linux), they also run
systems. After installing WSL (Windows Subsystem for Linux), they also run
on Microsoft Windows 10.
on Microsoft Windows 10.
\ No newline at end of file
## start-jupyter
The script is being modified to allow further features:
*
connecting to different DKRZ systems: mistral, vader, levante (?)
*
start jupyter notebooks in singularity containers
This diff is collapsed.
Click to expand it.
start-jupyter
+
12
−
6
View file @
c0f01291
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
# In case of problems contact Mathis Rosenhauer <rosenhauer@dkrz.de>.
# In case of problems contact Mathis Rosenhauer <rosenhauer@dkrz.de>.
#
#
# 2020, Oct. 7, S. Bendoukha, added support for singularity containers.
# 2020, Oct. 7, S. Bendoukha, added support for singularity containers.
# 2021, Apr. 14, S. Bendoukha, added option to specify frontend.
set
-eufo
pipefail
set
-eufo
pipefail
...
@@ -92,7 +93,7 @@ SJ_INCFILE=""
...
@@ -92,7 +93,7 @@ SJ_INCFILE=""
#
#
# Must be directly accessible from client. The frontend and the node
# Must be directly accessible from client. The frontend and the node
# where jupyter is running need a shared home file system.
# where jupyter is running need a shared home file system.
readonly
SJ_FRONTEND_HOST
=
"mistralpp.dkrz.de"
SJ_FRONTEND_HOST
=
"mistralpp.dkrz.de"
# Image
# Image
#
#
...
@@ -137,19 +138,21 @@ Available values for OPTION include:
...
@@ -137,19 +138,21 @@ Available values for OPTION include:
-A acctcode start a job with acctcode
-A acctcode start a job with acctcode
-c command invoke jupyter with command
-c command invoke jupyter with command
-d check for presence of jupyter
-d check for presence of jupyter
-f system mistral, vader
-i file source file prior to running jupyter
-i file source file prior to running jupyter
-n ntasks request ntasks tasks for job
-n ntasks request ntasks tasks for job
-p partition run job on partition
-p partition run job on partition
-s image singularity image
-t time job runtime
-t time job runtime
-u username use username for login
-u username use username for login
-s image singularity image
EOF
EOF
}
}
function
parse_options
()
{
function
parse_options
()
{
local
option
local
option
while
getopts
'A:c:di:n:p:t:u:s:'
option
;
do
while
getopts
'A:c:di:
f:
n:p:t:u:s:'
option
;
do
case
${
option
}
in
case
${
option
}
in
A
)
SJ_ACCTCODE
=
"
$OPTARG
"
A
)
SJ_ACCTCODE
=
"
$OPTARG
"
;;
;;
...
@@ -157,18 +160,20 @@ function parse_options () {
...
@@ -157,18 +160,20 @@ function parse_options () {
;;
;;
d
)
SJ_DEBUG
=
1
d
)
SJ_DEBUG
=
1
;;
;;
f
)
SJ_FRONTEND_HOST
=
"
$OPTARG
"
;;
i
)
SJ_INCFILE
=
"
$OPTARG
"
i
)
SJ_INCFILE
=
"
$OPTARG
"
;;
;;
n
)
SJ_NTASKS
=
"
$OPTARG
"
n
)
SJ_NTASKS
=
"
$OPTARG
"
;;
;;
p
)
SJ_PARTITION
=
"
$OPTARG
"
p
)
SJ_PARTITION
=
"
$OPTARG
"
;;
;;
s
)
SJ_IMAGE
=
"
$OPTARG
"
;;
t
)
SJ_RUNTIME
=
"
$OPTARG
"
t
)
SJ_RUNTIME
=
"
$OPTARG
"
;;
;;
u
)
SJ_USERNAME
=
"
$OPTARG
"
u
)
SJ_USERNAME
=
"
$OPTARG
"
;;
;;
s
)
SJ_IMAGE
=
"
$OPTARG
"
;;
?
)
usage
?
)
usage
exit
1
exit
1
;;
;;
...
@@ -183,6 +188,7 @@ function parse_options () {
...
@@ -183,6 +188,7 @@ function parse_options () {
readonly
SJ_RUNTIME
readonly
SJ_RUNTIME
readonly
SJ_USERNAME
readonly
SJ_USERNAME
readonly
SJ_IMAGE
readonly
SJ_IMAGE
readonly
SJ_FRONTEND_HOST
}
}
function
ssh_frontend
()
{
function
ssh_frontend
()
{
...
@@ -206,7 +212,7 @@ function source_incfile() {
...
@@ -206,7 +212,7 @@ function source_incfile() {
fi
fi
commandline
=
"source
${
incfile
}
;
${
commandline
}
"
commandline
=
"source
${
incfile
}
;
${
commandline
}
"
else
else
commandline
=
"module load python3/unstable;
${
commandline
}
"
commandline
=
"module
use /sw/spack-rhel6/spack/modules/linux-rhel6-haswell/; module
load python3/unstable;
${
commandline
}
"
fi
fi
echo
"
${
commandline
}
"
echo
"
${
commandline
}
"
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment