update: rename JUPYTER_VENV
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
# this is not system dependences
|
# this is not system dependences
|
||||||
|
jupyter
|
||||||
|
notebook
|
||||||
ipykernel
|
ipykernel
|
||||||
nbclient
|
nbclient
|
||||||
nbformat
|
nbformat
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
# this is not system dependences
|
# this is not system dependences
|
||||||
|
jupyter
|
||||||
|
notebook
|
||||||
ipykernel
|
ipykernel
|
||||||
nbclient
|
nbclient
|
||||||
nbformat
|
nbformat
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ JUPYTER_MAX_LIFETIME_SECONDS = int(
|
|||||||
# which also registers the Python 3.8 / 3.10 kernelspecs under that venv's
|
# 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;
|
# 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.
|
# 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_VENV = os.environ.get("JUPYTER_VENV", "/opt/venv/python3.8")
|
||||||
JUPYTER_BIN = os.path.join(JUPYTER_PY312_VENV, "bin", "jupyter")
|
JUPYTER_BIN = os.path.join(JUPYTER_VENV, "bin", "jupyter")
|
||||||
|
|
||||||
# Sidecar metadata file written next to the workspace directory. Holds
|
# Sidecar metadata file written next to the workspace directory. Holds
|
||||||
# the runtime state we need to reconstruct the in-memory map after a
|
# 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
|
# venv. VIRTUAL_ENV makes `python` / `pip` resolve against it; PATH
|
||||||
# prepended so its `bin/` wins over the runtime's /app/.venv.
|
# prepended so its `bin/` wins over the runtime's /app/.venv.
|
||||||
jupyter_env = os.environ.copy()
|
jupyter_env = os.environ.copy()
|
||||||
jupyter_env["VIRTUAL_ENV"] = JUPYTER_PY312_VENV
|
jupyter_env["VIRTUAL_ENV"] = JUPYTER_VENV
|
||||||
jupyter_env["PATH"] = (
|
jupyter_env["PATH"] = (
|
||||||
os.path.join(JUPYTER_PY312_VENV, "bin")
|
os.path.join(JUPYTER_VENV, "bin")
|
||||||
+ os.pathsep
|
+ os.pathsep
|
||||||
+ jupyter_env.get("PATH", "")
|
+ jupyter_env.get("PATH", "")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user