openhands commited on
Commit
76eaf68
·
1 Parent(s): 82145b3

fix: add PATH for jupyter-lab and use python3 -m jupyterlab

Browse files

- Add $HOME/.local/bin to PATH before checking for jupyter-lab
- Use python3 -m jupyterlab instead of jupyter-lab command

Files changed (1) hide show
  1. start.sh +4 -1
start.sh CHANGED
@@ -749,6 +749,9 @@ if [ -n "${CLOUDFLARE_PROXY_URL:-}" ]; then
749
  echo "Proxy : ${CLOUDFLARE_PROXY_URL}"
750
  fi
751
  RUNTIME_JUPYTER_ENABLED="$DEV_MODE_ENABLED"
 
 
 
752
  if [ "$DEV_MODE_ENABLED" = "true" ] && ! command -v jupyter-lab >/dev/null 2>&1; then
753
  echo "DEV_MODE enabled but jupyter-lab is missing; attempting runtime install..."
754
  if python3 -m pip install --user --no-cache-dir --break-system-packages jupyterlab==4.5.7 tornado==6.5.5 ipywidgets==8.1.8; then
@@ -856,7 +859,7 @@ start_jupyter_once() {
856
 
857
  echo "DEV_MODE enabled (${DEV_MODE_RAW}) — starting JupyterLab terminal on internal port 8888 (path: /terminal/) with root: $JUPYTER_ROOT_DIR"
858
  JUPYTER_LOG_FILE="/tmp/jupyterlab.log"
859
- jupyter-lab \
860
  --ip 127.0.0.1 \
861
  --port 8888 \
862
  --no-browser \
 
749
  echo "Proxy : ${CLOUDFLARE_PROXY_URL}"
750
  fi
751
  RUNTIME_JUPYTER_ENABLED="$DEV_MODE_ENABLED"
752
+ # Add user bin to PATH for jupyter-lab
753
+ export PATH="$HOME/.local/bin:$PATH"
754
+
755
  if [ "$DEV_MODE_ENABLED" = "true" ] && ! command -v jupyter-lab >/dev/null 2>&1; then
756
  echo "DEV_MODE enabled but jupyter-lab is missing; attempting runtime install..."
757
  if python3 -m pip install --user --no-cache-dir --break-system-packages jupyterlab==4.5.7 tornado==6.5.5 ipywidgets==8.1.8; then
 
859
 
860
  echo "DEV_MODE enabled (${DEV_MODE_RAW}) — starting JupyterLab terminal on internal port 8888 (path: /terminal/) with root: $JUPYTER_ROOT_DIR"
861
  JUPYTER_LOG_FILE="/tmp/jupyterlab.log"
862
+ python3 -m jupyterlab \
863
  --ip 127.0.0.1 \
864
  --port 8888 \
865
  --no-browser \