diff --git a/extras/requirements-py310 b/extras/requirements-py310 index fe84b78..8a49b77 100644 --- a/extras/requirements-py310 +++ b/extras/requirements-py310 @@ -1,4 +1,6 @@ # this is not system dependences +jupyter +notebook ipykernel nbclient nbformat diff --git a/extras/requirements-py38 b/extras/requirements-py38 index fe84b78..8a49b77 100644 --- a/extras/requirements-py38 +++ b/extras/requirements-py38 @@ -1,4 +1,6 @@ # this is not system dependences +jupyter +notebook ipykernel nbclient nbformat diff --git a/runtime/src/runtime/process.py b/runtime/src/runtime/process.py index e5dd9fa..e073bd7 100644 --- a/runtime/src/runtime/process.py +++ b/runtime/src/runtime/process.py @@ -69,8 +69,8 @@ JUPYTER_MAX_LIFETIME_SECONDS = int( # which also registers the Python 3.8 / 3.10 kernelspecs under that venv's # share/jupyter/kernels tree. The runtime only launches the server here; # user code runs in the per-kernel venv the user picks in the Notebook UI. -JUPYTER_PY312_VENV = os.environ.get("JUPYTER_PY312_VENV", "/opt/venv/python3.12") -JUPYTER_BIN = os.path.join(JUPYTER_PY312_VENV, "bin", "jupyter") +JUPYTER_VENV = os.environ.get("JUPYTER_VENV", "/opt/venv/python3.8") +JUPYTER_BIN = os.path.join(JUPYTER_VENV, "bin", "jupyter") # Sidecar metadata file written next to the workspace directory. Holds # the runtime state we need to reconstruct the in-memory map after a @@ -226,9 +226,9 @@ async def start_workspace(ws_id: str) -> dict: # venv. VIRTUAL_ENV makes `python` / `pip` resolve against it; PATH # prepended so its `bin/` wins over the runtime's /app/.venv. jupyter_env = os.environ.copy() - jupyter_env["VIRTUAL_ENV"] = JUPYTER_PY312_VENV + jupyter_env["VIRTUAL_ENV"] = JUPYTER_VENV jupyter_env["PATH"] = ( - os.path.join(JUPYTER_PY312_VENV, "bin") + os.path.join(JUPYTER_VENV, "bin") + os.pathsep + jupyter_env.get("PATH", "") )