forked from h2oai/h2o-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·37 lines (28 loc) · 789 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# Note: This run script is meant to be run inside the docker container.
#
# set -x
set -e
if [ "x$1" != "x" ]; then
d=$1
cd $d
shift
exec "$@"
fi
logdir=/log/`date "+%Y%m%d-%H%M%S"`
mkdir -p "$logdir"
echo "-------------------------"
echo "Welcome to H2O World 2017"
echo "-------------------------"
echo ""
echo "- Connect to Jupyter notebook on port 8888 (password: h2o)"
echo "- Connect to RStudio on port 8787 (username/password: h2o/h2o)"
source /home/h2o/Miniconda3/bin/activate h2o
(cd /home/h2o && \
jupyter --paths >> "$logdir"/jupyter.log && \
nohup jupyter notebook --ip='*' --no-browser --allow-root >> "$logdir"/jupyter.log 2>&1 &)
(cd /home/h2o && \
sudo rstudio-server start >> "$logdir"/rstudio-server.log)
# 10 years
sleep 3650d