Skip to content
Snippets Groups Projects
Commit e328eee6 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer
Browse files

start-jupyter: load python3/unstable module if no include file is given

parent 35560ae0
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
# #
# Copyright 2019 Deutsches Klimarechenzentrum GmbH # Copyright 2020 Deutsches Klimarechenzentrum GmbH
# #
# All rights reserved. # All rights reserved.
# #
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
# DKRZ's mistral nodes. The script then opens a ssh tunnel to connect # DKRZ's mistral nodes. The script then opens a ssh tunnel to connect
# your local browser to jupyter. # your local browser to jupyter.
# #
# If you indicate an account with the -A switch, the script will run # If you indicate an account with the -A option, the script will run
# jupyter in a job on dedicated resources. Otherwise jupyter uses a # jupyter in a job on dedicated resources. Otherwise jupyter uses a
# shared interactive node. # shared interactive node.
# #
...@@ -83,7 +83,8 @@ SJ_PARTITION=shared ...@@ -83,7 +83,8 @@ SJ_PARTITION=shared
# #
# If indicated, this file will be sourced prior to running jupyter # If indicated, this file will be sourced prior to running jupyter
# notebook. It has to be located on mistral. Set up the environment # notebook. It has to be located on mistral. Set up the environment
# for starting the correct jupyter here. # for starting the correct jupyter here. If no SJ_INCFILE is given,
# the module python3/unstable is loaded.
SJ_INCFILE="" SJ_INCFILE=""
# Frontend host # Frontend host
...@@ -194,6 +195,8 @@ function source_incfile() { ...@@ -194,6 +195,8 @@ function source_incfile() {
incfile="\${HOME}/${incfile}" incfile="\${HOME}/${incfile}"
fi fi
commandline="source ${incfile}; ${commandline}" commandline="source ${incfile}; ${commandline}"
else
commandline="module load python3/unstable; ${commandline}"
fi fi
echo "${commandline}" echo "${commandline}"
} }
......
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