Skip to content

Commit

Permalink
feat: configure lastModifiedCheckMargin for JupyterLab
Browse files Browse the repository at this point in the history
  • Loading branch information
leafty committed Jan 6, 2025
1 parent ff74c55 commit 0f142ce
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions docker/py/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ jupyter() {
fi
}

# run the command
if [[ -v RENKU_BASE_URL_PATH ]]; then
"$@" --ServerApp.port=8888 --ServerApp.base_url="$RENKU_BASE_URL_PATH" \
mkdir -p ~/.jupyter/lab/user-settings/\@jupyterlab/docmanager-extension
echo "{\"lastModifiedCheckMargin\": 5000}" > ~/.jupyter/lab/user-settings/\@jupyterlab/docmanager-extension/plugin.jupyterlab-settings

RENKU_SESSION_PORT="${RENKU_SESSION_PORT:-8888}"
RENKU_WORKING_DIR="${RENKU_WORKING_DIR:-${HOME}}"
RENKU_MOUNT_DIR="${RENKU_MOUNT_DIR:-${RENKU_WORKING_DIR}/work}"

"$@" --ServerApp.port="$RENKU_SESSION_PORT" --ServerApp.base_url="$RENKU_BASE_URL_PATH" \
--ServerApp.token="" --ServerApp.password="" --ServerApp.allow_remote_access=true \
--ContentsManager.allow_hidden=true --ServerApp.allow_origin=* \
--ServerApp.root_dir="${HOME}/work"
--ServerApp.root_dir="$RENKU_MOUNT_DIR"
else
"$@"
fi

# run the command
"$@"

0 comments on commit 0f142ce

Please sign in to comment.