Commit a1a7cfc4 authored by Katharina Höflich's avatar Katharina Höflich

More updates for descriptions

parent ef014474
......@@ -10,11 +10,11 @@
#
# $ qsub nesh-linux-cluster-jupyterlab.sh -l elapstim_req=<hh:mm:ss> -b <node-no> -l cpunum_job=<cpu-no> -l memsz_job=<mem-size> -q <batch-class>
# $ ./nesh-linux-cluster-jupyterlab.sh <jobid>
# $ qdel <jobid> # free resources after you are done!
# $ qdel <jobid> # free cluster resources after you are done!
#
#
#
# Linux cluster example
# Example request
#
# $ qsub nesh-linux-cluster-jupyterlab.sh -l elapstim_req=00:05:00 -b 1 -l cpunum_job=4 -l memsz_job=8gb -q clmedium
# Request 134408.nesh-batch submitted to queue: clmedium.
......@@ -27,6 +27,7 @@
# Request 134408.nesh-batch was deleted.
#
if [ -n "${1}" ]; then
qstat ${1} | grep -q "does not exist" && { echo "Job does not exist..."; exit; }
status=$(qstat ${1} -f | echo $(string=$(grep 'Current State'); echo ${string##* }))
......@@ -36,18 +37,19 @@ if [ -n "${1}" ]; then
remote_host=$(qcat -o -b -n25 ${1} | grep -m1 -e 'host'); remote_host=${remote_host//'host '}
qstat ${1} -f | echo "scale=2; $(string=$(grep 'Remaining Elapse'); echo ${string//[!0-9]})/60" | \
echo "$(bc) minutes remaining at execution host ${remote_host}" &&
qcat -o -b -n25 ${1} | grep -m1 -e "://${remote_host}:" || echo 'Jupyter Lab not yet properly running... please wait.'
qcat -o -b -n25 ${1} | grep -m1 -e "://${remote_host}:" || echo 'JupyterLab not yet properly running... please wait.'
fi
else
# For convencience only.
cd $PBS_O_WORKDIR
# Will be fetched by above qstat commands.
echo "host $(hostname)"
#
# this only works for conda>=4.6
# after proper initialisation with
# ${HOME}/miniconda3/bin/conda init bash
#
eval "$(conda shell.bash hook)" # properly initialise this non-interactive shell
# Properly initialize non-interactive Bash shell.
# Works only for conda>=4.6 set up with `${HOME}/miniconda3/bin/conda init bash`
eval "$(conda shell.bash hook)"
# Activate JupyterLab environment
conda activate base && \
# Launch JupyterLab instance
jupyter lab --ip=$(hostname) --no-browser
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment