From cc137cca2230158c5a35dd16a4258b1b326058ef Mon Sep 17 00:00:00 2001 From: Mathiyarasy <157102811+Mathiyarasy@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:04:28 +0000 Subject: [PATCH] Add path for JupyterLab --- src/python/devcontainer-feature.json | 2 +- src/python/install.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/python/devcontainer-feature.json b/src/python/devcontainer-feature.json index 64b02fd34..6a3a51593 100644 --- a/src/python/devcontainer-feature.json +++ b/src/python/devcontainer-feature.json @@ -67,7 +67,7 @@ "PYTHON_PATH": "/usr/local/python/current", "PIPX_HOME": "/usr/local/py-utils", "PIPX_BIN_DIR": "/usr/local/py-utils/bin", - "PATH": "/usr/local/python/current/bin:/usr/local/py-utils/bin:${PATH}" + "PATH": "/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/jupyter:${PATH}" }, "customizations": { "vscode": { diff --git a/src/python/install.sh b/src/python/install.sh index ead55cc8a..94a7edbde 100755 --- a/src/python/install.sh +++ b/src/python/install.sh @@ -926,6 +926,13 @@ if [ "${INSTALL_JUPYTERLAB}" = "true" ]; then # either string is not found, or file is not present # In either case take same action, note >> places at end of file echo "${REPLACE_STR}:${PATH}" >> ${SUDOERS_FILE} + JUPYTER_INPATH=/home/${USERNAME}/.local/bin + if [ ! -d "$JUPYTER_INPATH" ]; then + echo "Error: $JUPYTER_INPATH does not exist." + exit 1 + fi + JUPYTER_PATH=/usr/local/jupyter + ln -s "$JUPYTER_INPATH" "$JUPYTER_PATH" fi fi