fix: notebook-dir
This commit is contained in:
@@ -160,7 +160,7 @@ def _bump_last_used(record: JupyterProcessRecord) -> None:
|
|||||||
|
|
||||||
async def start_workspace(ws_id: str) -> dict:
|
async def start_workspace(ws_id: str) -> dict:
|
||||||
async with get_workspace_lock(ws_id):
|
async with get_workspace_lock(ws_id):
|
||||||
workspace_path = WORKSPACES_ROOT / ws_id
|
workspace_path = (WORKSPACES_ROOT / ws_id).resolve()
|
||||||
workspace_path.mkdir(parents=True, exist_ok=True)
|
workspace_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if ws_id in JUPYTER_PROCESSES:
|
if ws_id in JUPYTER_PROCESSES:
|
||||||
@@ -202,7 +202,7 @@ async def start_workspace(ws_id: str) -> dict:
|
|||||||
"--allow-root",
|
"--allow-root",
|
||||||
f"--ServerApp.token={token}",
|
f"--ServerApp.token={token}",
|
||||||
f"--ServerApp.base_url={base_path}",
|
f"--ServerApp.base_url={base_path}",
|
||||||
"--notebook-dir=.",
|
f"--notebook-dir={workspace_path}",
|
||||||
"--ServerApp.terminals_enabled=False",
|
"--ServerApp.terminals_enabled=False",
|
||||||
"--NotebookApp.terminals_enabled=False",
|
"--NotebookApp.terminals_enabled=False",
|
||||||
"--ServerApp.allow_origin=*",
|
"--ServerApp.allow_origin=*",
|
||||||
@@ -212,7 +212,7 @@ async def start_workspace(ws_id: str) -> dict:
|
|||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
process, log_file = start_process(cmd, workspace_path)
|
process, log_file = start_process(cmd, workspace_path.as_posix())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to start Jupyter for {ws_id}: {e}")
|
logger.error(f"Failed to start Jupyter for {ws_id}: {e}")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|||||||
Reference in New Issue
Block a user