generated from kbase/kbase-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from kbase/dev_add_delta_spark_packages
add delta spark packages to support delta lake
- Loading branch information
Showing
9 changed files
with
324 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
.idea | ||
.coverage | ||
*_pycache__ | ||
*_pycache__ | ||
cdr/cdm/jupyter/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,10 @@ | ||
#!/bin/bash | ||
|
||
echo "starting jupyter notebook" | ||
|
||
if [ -n "$SPARK_DRIVER_HOST" ]; then | ||
echo "Setting spark.driver.host to $SPARK_DRIVER_HOST" | ||
source /opt/bitnami/scripts/spark-env.sh | ||
if [ -z "$SPARK_CONF_FILE" ]; then | ||
echo "Error: unable to find SPARK_CONF_FILE path" | ||
exit 1 | ||
fi | ||
echo "spark.driver.host $SPARK_DRIVER_HOST" >> $SPARK_CONF_FILE | ||
fi | ||
|
||
WORKSPACE_DIR="/cdm_shared_workspace" | ||
mkdir -p "$WORKSPACE_DIR" | ||
cd "$WORKSPACE_DIR" | ||
|
||
# Start Jupyter Lab | ||
jupyter lab --ip=0.0.0.0 \ | ||
--port=$NOTEBOOK_PORT \ | ||
--no-browser \ | ||
--allow-root \ | ||
--notebook-dir="$WORKSPACE_DIR" \ | ||
--ServerApp.token='' \ | ||
--ServerApp.password='' | ||
if [ "$SPARK_MODE" = "notebook" ]; then | ||
exec /opt/scripts/notebook_entrypoint.sh "$@" | ||
else | ||
# In bitnami/spark Dockerfile, the entrypoint is set to /opt/bitnami/scripts/spark/entrypoint.sh and followed | ||
# by CMD ["/opt/bitnami/scripts/spark/run.sh"] meaning that the entrypoint is expected the run.sh script as an argument. | ||
# reference: https://github.com/bitnami/containers/blob/main/bitnami/spark/3.5/debian-12/Dockerfile#L69 | ||
exec /opt/bitnami/scripts/spark/entrypoint.sh "$@" /opt/bitnami/scripts/spark/run.sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
echo "starting jupyter notebook" | ||
|
||
if [ -n "$SPARK_DRIVER_HOST" ]; then | ||
echo "Setting spark.driver.host to $SPARK_DRIVER_HOST" | ||
source /opt/bitnami/scripts/spark-env.sh | ||
if [ -z "$SPARK_CONF_FILE" ]; then | ||
echo "Error: unable to find SPARK_CONF_FILE path" | ||
exit 1 | ||
fi | ||
echo "spark.driver.host $SPARK_DRIVER_HOST" >> $SPARK_CONF_FILE | ||
fi | ||
|
||
WORKSPACE_DIR="/cdm_shared_workspace" | ||
mkdir -p "$WORKSPACE_DIR" | ||
cd "$WORKSPACE_DIR" | ||
|
||
# Start Jupyter Lab | ||
jupyter lab --ip=0.0.0.0 \ | ||
--port=$NOTEBOOK_PORT \ | ||
--no-browser \ | ||
--allow-root \ | ||
--notebook-dir="$WORKSPACE_DIR" \ | ||
--ServerApp.token='' \ | ||
--ServerApp.password='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters