Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: run / edit mode for docker (#6724)

Dylan Madisettia0ff7e1f6fe7
diff --git a/marimo/_cli/cli.py b/marimo/_cli/cli.py
index 87d3eb8c62..b6531baa3a 100644
--- a/marimo/_cli/cli.py
+++ b/marimo/_cli/cli.py
@@ -529,6 +529,7 @@ def edit(
run_in_docker(
name,
+ "edit",
port=port,
debug=GLOBAL_SETTINGS.DEVELOPMENT_MODE,
)
@@ -1016,6 +1017,7 @@ def run(
run_in_docker(
name,
+ "run",
port=port,
debug=GLOBAL_SETTINGS.DEVELOPMENT_MODE,
)
diff --git a/marimo/_cli/run_docker.py b/marimo/_cli/run_docker.py
index db7d44faa3..5715078a86 100644
--- a/marimo/_cli/run_docker.py
+++ b/marimo/_cli/run_docker.py
@@ -3,7 +3,7 @@ from __future__ import annotations
import subprocess
import sys
-from typing import Optional
+from typing import Literal, Optional
import click
from click import echo
@@ -93,6 +93,7 @@ def _check_port_in_use(port: int) -> Optional[str]:
def run_in_docker(
file_path: str,
+ mode: Literal["edit", "run"],
*,
port: Optional[int],
debug: bool = False,
@@ -132,7 +133,7 @@ def run_in_docker(
"uvx",
"marimo",
"-d" if debug else "",
- "edit",
+ mode,
"--sandbox",
"--no-token",
"-p",