|
|
|
@@ -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", "")
|
|
|
|
|
)
|
|
|
|
|