github.com/dmaizel/tests@v0.0.0-20210728163746-cae6a2d9cee8/metrics/storage/fio-k8s/scripts/dax-compare-test/report/run-docker-jupyter-server.sh (about) 1 #!/bin/bash 2 #Copyright (c) 2021 Intel Corporation 3 # 4 #SPDX-License-Identifier: Apache-2.0 5 # 6 7 set -o errexit 8 set -o nounset 9 set -o pipefail 10 set -o errtrace 11 12 script_dir=$(dirname "$(readlink -f "$0")") 13 NOTEBOOK_PORT="8888" 14 15 results_dir=${1:-} 16 17 usage(){ 18 echo "$0 <results_dir>" 19 } 20 21 if [ "${results_dir}" == "" ];then 22 echo "missing results directory" 23 usage 24 exit 1 25 fi 26 27 if [ ! -d "${results_dir}" ];then 28 echo "${results_dir} is not a directory" 29 usage 30 exit 1 31 fi 32 33 results_dir=$(realpath "${results_dir}") 34 35 sudo -E docker run --rm -p "${NOTEBOOK_PORT}:${NOTEBOOK_PORT}" -e JUPYTER_ENABLE_LAB=yes \ 36 -v "${script_dir}:/home/jovyan" \ 37 -v "${results_dir}:/home/jovyan/results" \ 38 jupyter/scipy-notebook:399cbb986c6b \ 39 start.sh jupyter lab --LabApp.token=''