Skip to content

Commit

Permalink
docker image jupyter (intel#3938)
Browse files Browse the repository at this point in the history
> Is this PR tested and ready for merge?
yes
  • Loading branch information
Le-Zheng authored Feb 16, 2022
1 parent 8262539 commit 90331c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 59 deletions.
59 changes: 1 addition & 58 deletions docker/bigdl/start-notebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,5 @@

set -x

#setup pathes
BIGDL_TUTORIALS_HOME=${BIGDL_HOME}/apps
SPARK_MAJOR_VERSION=${SPARK_VERSION%%.[0-9]}
echo $BIGDL_HOME
echo $BIGDL_VERSION
echo $SPARK_VERSION
echo $SPARK_MAJOR_VERSION

export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --notebook-dir=$BIGDL_TUTORIALS_HOME --ip=0.0.0.0 --port=$NOTEBOOK_PORT --no-browser --NotebookApp.token=$NOTEBOOK_TOKEN --allow-root"

echo $RUNTIME_SPARK_MASTER
echo $RUNTIME_EXECUTOR_CORES
echo $RUNTIME_DRIVER_CORES
echo $RUNTIME_DRIVER_MEMORY
echo $RUNTIME_EXECUTOR_CORES
echo $RUNTIME_EXECUTOR_MEMORY
echo $RUNTIME_TOTAL_EXECUTOR_CORES

if [ -z "${KMP_AFFINITY}" ]; then
export KMP_AFFINITY=granularity=fine,compact,1,0
fi

if [ -z "${OMP_NUM_THREADS}" ]; then
if [ -z "${ZOO_NUM_MKLTHREADS}" ]; then
export OMP_NUM_THREADS=1
else
if [ `echo $ZOO_NUM_MKLTHREADS | tr '[A-Z]' '[a-z]'` == "all" ]; then
export OMP_NUM_THREADS=`nproc`
else
export OMP_NUM_THREADS=${ZOO_NUM_MKLTHREADS}
fi
fi
fi

if [ -z "${KMP_BLOCKTIME}" ]; then
export KMP_BLOCKTIME=0
fi

# verbose for OpenMP
if [[ $* == *"verbose"* ]]; then
export KMP_SETTINGS=1
export KMP_AFFINITY=${KMP_AFFINITY},verbose
fi

${SPARK_HOME}/bin/pyspark \
--master ${RUNTIME_SPARK_MASTER} \
--driver-cores ${RUNTIME_DRIVER_CORES} \
--driver-memory ${RUNTIME_DRIVER_MEMORY} \
--executor-cores ${RUNTIME_EXECUTOR_CORES} \
--executor-memory ${RUNTIME_EXECUTOR_MEMORY} \
--total-executor-cores ${RUNTIME_TOTAL_EXECUTOR_CORES} \
--properties-file ${BIGDL_HOME}/conf/spark-bigdl.conf \
--py-files local://${BIGDL_HOME}/python/bigdl-spark_${SPARK_VERSION}-${BIGDL_VERSION}-python-api.zip \
--jars local://${BIGDL_HOME}/jars/* \
--conf spark.driver.extraClassPath=local://${BIGDL_HOME}/jars/* \
--conf spark.executor.extraClassPath=local://${BIGDL_HOME}/jars/* \
--conf spark.driver.extraJavaOptions=-Dderby.stream.error.file=/tmp \
--conf spark.sql.catalogImplementation='in-memory'
jupyter notebook --notebook-dir=$BIGDL_HOME/apps --ip=0.0.0.0 --port=$NOTEBOOK_PORT --no-browser --NotebookApp.token=$NOTEBOOK_TOKEN --allow-root
1 change: 0 additions & 1 deletion docs/readthedocs/source/doc/UserGuide/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ After a Docker container is launched and user login into the container, you can

In the `/opt/work` directory, run this command line to start the Jupyter Notebook service:
```
source activate bigdl
./start-notebook.sh
```

Expand Down

0 comments on commit 90331c0

Please sign in to comment.