This is an automated email from the ASF dual-hosted git repository. shimamoto pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/predictionio.git
The following commit(s) were added to refs/heads/develop by this push: new 2220311 [PIO-196] Use external pyspark enviroment variables 2220311 is described below commit 222031141544dc421a38df28ea36af3f7443dc69 Author: Shinsuke Sugaya <shinsuke.sug...@gmail.com> AuthorDate: Tue Nov 27 20:32:01 2018 +0900 [PIO-196] Use external pyspark enviroment variables --- docker/JUPYTER.md | 8 +------- docker/docker-compose.jupyter.yml | 1 + docker/jupyter/start-jupyter.sh | 8 ++++++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docker/JUPYTER.md b/docker/JUPYTER.md index 7a6e988..c705147 100644 --- a/docker/JUPYTER.md +++ b/docker/JUPYTER.md @@ -36,13 +36,7 @@ docker-compose -f docker-compose.jupyter.yml \ up ``` -The above command prints a token to the console as below. - -``` -pio_1 | http://(3aaf67361022 or 127.0.0.1):8888/?token=e87a634b4ab7e2c8bcd86aea9def3eb48183c043eac86f3e -``` - -Open `http://127.0.0.1:8888/`, type the token, and then open a new terminal in Jupyter from `New` pulldown button. +Open `http://127.0.0.1:8888/` and then open a new terminal in Jupyter from `New` pulldown button. ## Getting Started With Scala Based Template diff --git a/docker/docker-compose.jupyter.yml b/docker/docker-compose.jupyter.yml index e2667bb..6e25a4a 100644 --- a/docker/docker-compose.jupyter.yml +++ b/docker/docker-compose.jupyter.yml @@ -28,4 +28,5 @@ services: - CHOWN_HOME=yes - GRANT_SUDO=yes - VOLUME_UID=yes + - "PYSPARK_DRIVER_PYTHON_OPTS=notebook --NotebookApp.token=''" dns: 8.8.8.8 diff --git a/docker/jupyter/start-jupyter.sh b/docker/jupyter/start-jupyter.sh index 1458e54..d75598f 100644 --- a/docker/jupyter/start-jupyter.sh +++ b/docker/jupyter/start-jupyter.sh @@ -30,8 +30,12 @@ fi sh /usr/bin/pio_run & export PYSPARK_PYTHON=$CONDA_DIR/bin/python -export PYSPARK_DRIVER_PYTHON=$CONDA_DIR/bin/jupyter -export PYSPARK_DRIVER_PYTHON_OPTS=notebook +if [ x"$PYSPARK_DRIVER_PYTHON" = "x" ] ; then + export PYSPARK_DRIVER_PYTHON=$CONDA_DIR/bin/jupyter +fi +if [ x"$PYSPARK_DRIVER_PYTHON_OPTS" = "x" ] ; then + export PYSPARK_DRIVER_PYTHON_OPTS=notebook +fi . /usr/local/bin/start.sh $PIO_HOME/bin/pio-shell --with-pyspark