Skip to content

Commit

Permalink
added script to start up pyspark in a jupyter server
Browse files Browse the repository at this point in the history
  • Loading branch information
wresch committed May 19, 2022
1 parent 4756d68 commit ce3167a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pyspark-jupyter
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/bash

if [[ "${PORT1:-none}" == "none" ]] ; then
PORT1=$(( (RANDOM % 10000) + 2000 ))
fi
echo "Running on port ${PORT1} on $(hostname) listening on localhost"

export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --port=${PORT1} --ip=localhost --no-browser"
exec pyspark "$@"

0 comments on commit ce3167a

Please sign in to comment.