Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
# The next two lines aren't great. But they're for updating PYTHONPATH, PATH in older than (inclusive) us.gcr.io/broad-dsp-gcr-public/terra-jupyter-base:1.0.2
# We should remove the two lines once we no longer support older images. In the meantime, we need to be careful updating Jupyter base images.
PYTHONPATH: "/etc/jupyter/custom:/usr/lib/spark/python:${NOTEBOOKS_DIR}/packages"
PATH: "/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${NOTEBOOKS_DIR}/.local/bin:${NOTEBOOKS_DIR}/packages/bin"
PATH: "/root/.local/bin:/etc/jupyter/bin:/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${NOTEBOOKS_DIR}/.local/bin:${NOTEBOOKS_DIR}/packages/bin"
env_file:
- /var/custom_env_vars.env
# See https://docs.docker.com/engine/reference/run/#user-memory-constraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
# We should remove the two lines once we no longer support older images.
# When we update base image in terra-docker next time, we should verify the paths are still valid
PYTHONPATH: "/etc/jupyter/custom:/usr/lib/spark/python:${NOTEBOOKS_DIR}/packages"
PATH: "/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${HOME}/.local/bin:${NOTEBOOKS_DIR}/packages/bin"
PATH: "/root/.local/bin:/etc/jupyter/bin:/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${HOME}/.local/bin:${NOTEBOOKS_DIR}/packages/bin"
env_file:
- /var/custom_env_vars.env
# See https://docs.docker.com/engine/reference/run/#user-memory-constraints
Expand Down
10 changes: 9 additions & 1 deletion http/src/main/resources/init-resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,16 @@ if [ ! -z "$JUPYTER_DOCKER_IMAGE" ] ; then
# This is to make it so that older images will still work after we change notebooks location to home dir
docker exec ${JUPYTER_SERVER_NAME} sed -i '/^# to mount there as it effectively deletes existing files on the image/,+5d' ${JUPYTER_HOME}/jupyter_notebook_config.py

# Determine jupyter path based on image type
# images based on the new terra-base have jupyter installed in /etc/jupyter/bin/jupyter
if docker exec $JUPYTER_SERVER_NAME test -f /etc/jupyter/.terra-base-marker; then
JUPYTER_PATH="/etc/jupyter/bin/jupyter"
else
JUPYTER_PATH="/opt/conda/bin/jupyter"
fi

# Start Jupyter server
docker exec -d $JUPYTER_SERVER_NAME /bin/bash -c "export WELDER_ENABLED=$WELDER_ENABLED && export NOTEBOOKS_DIR=$NOTEBOOKS_DIR && (/etc/jupyter/scripts/run-jupyter.sh $NOTEBOOKS_DIR || /opt/conda/bin/jupyter notebook)"
docker exec -d $JUPYTER_SERVER_NAME /bin/bash -c "export WELDER_ENABLED=$WELDER_ENABLED && export NOTEBOOKS_DIR=$NOTEBOOKS_DIR && (/etc/jupyter/scripts/run-jupyter.sh $NOTEBOOKS_DIR || $JUPYTER_PATH notebook)"
fi

# Configuring RStudio, if enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ abstract class BaseCloudServiceRuntimeMonitor[F[_]] {
runtimeAndRuntimeConfig: RuntimeAndRuntimeConfig,
errorDetails: RuntimeErrorDetails,
mainInstance: Option[DataprocInstance],
deleteRuntime: Boolean = true
deleteRuntime: Boolean = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know this already, but just a ping to remove before merging :)

)(implicit
ev: Ask[F, AppContext]
): F[CheckResult] =
Expand Down Expand Up @@ -590,7 +590,7 @@ abstract class BaseCloudServiceRuntimeMonitor[F[_]] {
Some("tool_start_up")
),
mainDataprocInstance,
deleteRuntimeOnFail
false
)
}
} yield r
Expand Down
Loading