fix: also pass entity env var to container - #1
Open
ijdoc wants to merge 2 commits into
Open
Conversation
vanpelt
added a commit
that referenced
this pull request
Nov 7, 2025
- Fix CRITICAL ISSUE #1: Change detection logic from checking entrypoint[0] == "marimo" to flavor == "marimo" - After FLAVORS change, entrypoint[0] is now "python" not "marimo" - Add flavor field to ModConfig to enable proper detection - Pass flavor through from details_from_config - Fix CRITICAL ISSUE #2: Add cleanup for marimo-entrypoint.py in finally block - Previously left build artifacts in mod directories - Now properly cleans up marimo-entrypoint.py alongside other temporary files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
vanpelt
added a commit
that referenced
this pull request
Nov 8, 2025
* Add design document for marimo edit/publish modes This design enables switching between marimo edit mode (interactive) and publish mode (read-only) via MARIMO_MODE environment variable, supporting both dev and production environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add .worktrees/ to .gitignore Prevent worktree directories from being tracked in git. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add production entrypoint wrapper for marimo mode switching * fix: make marimo-entrypoint.py executable * feat: support MARIMO_MODE environment variable in dev entrypoint * feat: copy marimo-entrypoint.py and use it in Docker CMD * fix: correct marimo flavor detection and add cleanup - Fix CRITICAL ISSUE #1: Change detection logic from checking entrypoint[0] == "marimo" to flavor == "marimo" - After FLAVORS change, entrypoint[0] is now "python" not "marimo" - Add flavor field to ModConfig to enable proper detection - Pass flavor through from details_from_config - Fix CRITICAL ISSUE #2: Add cleanup for marimo-entrypoint.py in finally block - Previously left build artifacts in mod directories - Now properly cleans up marimo-entrypoint.py alongside other temporary files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add example marimo mod with edit/publish mode support * chore: remove build artifacts from marimo mod directory * fix: add marimo to dev.py flavor validation list * docs: document MARIMO_MODE environment variable Add documentation for marimo mode switching feature to README. Explains edit vs publish modes and how to control them using the MARIMO_MODE environment variable in both development and production environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: add uv.lock and update gitignore for marimo-entrypoint.py * feat: add marimo[recommended] extras for enhanced functionality * chore: add docs/plans to gitignore and remove from tracking, auto-format app.py * refactor: use --no-sandbox for marimo, simplify deps, change publish→run terminology - Add --headless, --no-token, --no-sandbox flags to marimo commands - Change MARIMO_MODE values from 'publish' to 'run' (matches marimo CLI) - Simplify example mod dependencies to marimo[recommended], weave, wandb - Update inline script metadata to match pyproject.toml - Fix string formatting in dev-entrypoint.py * feat: add Node.js LTS to marimo production images - Add Node.js LTS installation to Dockerfile template (conditional for marimo flavor) - Marimo uses Node.js for code completion, formatting, and other IDE features - Only installs for marimo flavor to keep other images minimal - Uses official NodeSource LTS repository for Debian Bookworm Note: Dev image (ghcr.io/wandb/weave-mods/dev) needs separate update * feat: add Node.js LTS to dev image for marimo support - Install Node.js LTS in Dockerfile.dev for development environment - Enables marimo code completion, formatting, and IDE features in dev mode - Matches production image configuration * fix: install dumb-init via apt as root to avoid permission errors - Install dumb-init from Debian package repository as root - Remove uv tool install dumb-init (which failed with permission denied) - For marimo: Install alongside Node.js in single apt-get command - For non-marimo: Install in separate RUN command before USER 999 - Update ENTRYPOINT path from /app/.local/bin/dumb-init to /usr/bin/dumb-init This fixes the Docker build error where uv tool install tried to symlink to /usr/local/bin/ after switching to non-root user 999. * refactor: move dumb-init install to Dockerfile.template, simplify build.py - Add dumb-init installation directly in Dockerfile.template (needed by all flavors) - Remove duplicated dumb-init logic from build.py - build.py now only handles marimo-specific Node.js installation - Cleaner separation: template has common deps, build.py has flavor-specific deps * fix: add locales and default production to run mode - Install locales package and configure en_US.UTF-8 to fix locale warnings - Set LANG, LANGUAGE, LC_ALL environment variables - Change production default from edit mode to run mode (makes more sense) - Update all documentation to reflect new defaults: - Dev environment: defaults to edit mode - Production: defaults to run mode - Rename 'publish' terminology to 'run' in remaining docs * fix: add locale configuration to eliminate setlocale warnings - Install locales package in both dev and production images - Generate en_US.UTF-8 locale - Set LANG, LANGUAGE, and LC_ALL environment variables - Fixes: 'bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)' * feat: add custom PS1 prompt for marimo containers - Set PS1='app@marimo:\w$ ' for marimo flavor containers - Shows 'app@marimo' instead of container ID in terminal prompt - Added to both dev and production Dockerfiles - Improves terminal UX with recognizable prompt * fix: use bashrc to set PS1 with dynamic WANDB_PROJECT - Append PS1 configuration to /etc/bash.bashrc (persists through shell init) - Use ${WANDB_PROJECT:-mods} to show project name or 'mods' as default - Works around shell init scripts overriding ENV settings - Examples: - No WANDB_PROJECT: app@mods:~$ - WANDB_PROJECT=myproject: app@myproject:~$ --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.