Skip to content

Commit 14f6df3

Browse files
committed
fix: sshfs workflow
1 parent afd2879 commit 14f6df3

3 files changed

Lines changed: 12 additions & 57 deletions

File tree

examples/ssh-sidecar/notebook.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

plugin/examples/with-sshfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ///
44
# [tool.marimo.k8s]
55
# storage = "1Gi"
6-
# mounts = ["sshfs://user@host:/data"]
6+
# mounts = ["sshfs://data"]
77

88
import marimo
99

plugin/kubectl_marimo/deploy.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,14 @@ def setup_local_sshfs_mount(
215215
Returns:
216216
Port-forward process, or None if setup failed
217217
"""
218+
# Check sshfs is installed
219+
result = subprocess.run(["which", "sshfs"], capture_output=True)
220+
sshfs_available = result.returncode == 0
221+
218222
# Find available local port for SSH
219223
local_ssh_port = find_available_port(ssh_port)
220224

221-
# Start port-forward in background
225+
# Always start port-forward for SSH access (even without sshfs)
222226
pf_proc = subprocess.Popen(
223227
[
224228
"kubectl",
@@ -235,6 +239,12 @@ def setup_local_sshfs_mount(
235239
# Wait for port-forward to be ready
236240
time.sleep(2)
237241

242+
if not sshfs_available:
243+
click.echo("sshfs not installed - skipping local mount.", err=True)
244+
click.echo("You can SSH directly to access files:", err=True)
245+
click.echo(f" ssh -p {local_ssh_port} marimo@localhost", err=True)
246+
return pf_proc # Return port-forward process so it stays alive
247+
238248
# Create local mount directory
239249
local_mount_path = Path(local_mount).expanduser().resolve()
240250
local_mount_path.mkdir(parents=True, exist_ok=True)

0 commit comments

Comments
 (0)