chore: rollback mount path

This commit is contained in:
tao.chen
2026-07-31 19:49:02 +08:00
parent 4ac8485d3e
commit a44b984203
4 changed files with 6 additions and 11 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ def start_rclone_mount() -> None:
"rclone",
"mount",
REMOTE_BUCKET,
str(WORKSPACES_ROOT),
WORKSPACES_ROOT.as_posix(),
"--allow-other",
"--vfs-cache-mode", "full",
"--vfs-cache-max-size", "20G",
+2 -7
View File
@@ -24,7 +24,6 @@ from common.utils import get_free_port, start_process
from runtime.mount import WORKSPACES_ROOT
PUBLIC_BASE_URL = settings.public_base_url
JUPYTER_PROCESS_CWD = Path("/app")
class JupyterProcessRecord(TypedDict):
@@ -108,7 +107,7 @@ async def start_workspace(ws_id: str) -> dict:
"--allow-root",
f"--ServerApp.token={token}",
f"--ServerApp.base_url={base_path}",
f"--ServerApp.root_dir={workspace_path}",
"--notebook-dir=.",
"--ServerApp.terminals_enabled=False",
"--NotebookApp.terminals_enabled=False",
"--ServerApp.allow_origin=*",
@@ -118,11 +117,7 @@ async def start_workspace(ws_id: str) -> dict:
]
try:
# Keep the server process cwd off the rclone/FUSE mount. Remote
# S3 directory refreshes can replace a virtual directory inode,
# leaving a long-lived cwd marked "(deleted)" and making
# os.getcwd() fail while Jupyter starts kernels or nbconvert.
process, log_file = start_process(cmd, JUPYTER_PROCESS_CWD)
process, log_file = start_process(cmd, workspace_path)
except Exception as e:
logger.error(f"Failed to start Jupyter for {ws_id}: {e}")
raise HTTPException(