[
https://issues.apache.org/jira/browse/PIO-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16700280#comment-16700280
]
ASF GitHub Bot commented on PIO-196:
------------------------------------
shimamoto closed pull request #501: [PIO-196] Use external pyspark enviroment
variables
URL: https://github.com/apache/predictionio/pull/501
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docker/JUPYTER.md b/docker/JUPYTER.md
index 7a6e988aa..c705147d1 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 e2667bbc6..6e25a4aba 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 1458e547f..d75598fcc 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
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Use external PySpark environment variables in Jupyter Docker image
> ------------------------------------------------------------------
>
> Key: PIO-196
> URL: https://issues.apache.org/jira/browse/PIO-196
> Project: PredictionIO
> Issue Type: Improvement
> Reporter: Shinsuke Sugaya
> Assignee: Shinsuke Sugaya
> Priority: Minor
>
> - Set PYSPARK_DRIVER_PYTHON* values at runtime
> - Ignore a token for Jupyter
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)