# How to Update Marin to the Latest Version: A Step-by-Step Guide for the Monorepo

> Update Marin to the latest version with this step-by-step guide. Learn how to pull new commits and refresh workspace dependencies using uv sync for your monorepo.

- Repository: [The Marin Project/marin](https://github.com/marin-community/marin)
- Tags: how-to-guide
- Published: 2026-08-29

---

**To update Marin to the latest version, pull the newest commits from the repository root and run `uv sync` to refresh all inter-dependent workspace dependencies.**

Marin is an open-source monorepo maintained by marin-community that houses multiple interconnected workspaces including marin-iris, marin-levanter, and marin-zephyr. When you need to update Marin to the latest version, you must synchronize both the source code and the Python environment defined in [`pyproject.toml`](https://github.com/marin-community/marin/blob/main/pyproject.toml) to maintain compatibility across all sub-packages.

## Prerequisites for Updating Marin

Before executing the update, ensure your environment meets these requirements:

- Git access to the `marin-community/marin` repository
- The `uv` package manager installed (the preferred installer for this monorepo)
- Current working directory set to the repository root

## The Standard Update Workflow

Updating Marin follows a two-phase process: synchronizing the source code and refreshing the workspace environment.

### Pull the Latest Commits

First, retrieve the newest code including experiment scripts, library updates, and bug fixes:

```bash
git pull origin main

```

This command updates your local branch with changes from the remote main branch.

### Synchronize Dependencies with uv

Run `uv sync` from the repository root to reinstall all packages declared in [`pyproject.toml`](https://github.com/marin-community/marin/blob/main/pyproject.toml) and the workspace members:

```bash
uv sync

```

This ensures you receive the newest versions of *marin-iris*, *marin-levanter*, *marin-zephyr*, and other inter-dependent components simultaneously.

### Verify the Update

Confirm the runtime reflects the latest code by inspecting the version attributes:

```bash
python -c "import marin, levanter; print(marin.__version__, levanter.__version__)"

```

If the output shows recent version numbers, the synchronization succeeded.

## Alternative Update Methods

Depending on your specific workflow, you might need these alternative approaches.

### Using pip for Editable Install

If you prefer pip over uv, reinstall the repository in editable mode to guarantee imports resolve to freshly-checked-out sources:

```bash
pip install -e .

```

This prevents Python from loading stale wheel installations cached in your environment.

### Updating a Single Workspace

To update only one component rather than the entire monorepo (for example, just the *levanter* library):

```bash
uv sync -p lib/levanter

```

This command rebuilds only the specified workspace while maintaining compatibility with the core system.

## Post-Update Validation

After updating Marin to the latest version, validate the installation to catch regressions before starting new experiments.

### Run the Test Suite

Execute the centralized test runner implemented in [`infra/ci/run_tests.py`](https://github.com/marin-community/marin/blob/main/infra/ci/run_tests.py):

```bash
uv run --no-project infra/ci/run_tests.py

```

This validates the integrity of the entire workspace. If any tests fail, you can roll back with `git checkout <old-sha>` or file an issue against the repository.

## Updating Containerized Deployments

For users running Marin via Docker or Kubernetes, the update process differs slightly. Simply rebuild or re-pull the container image after pulling the latest code. The Dockerfile in marin-community/marin already installs the workspace in editable mode, so the standard image build process incorporates all updated source files automatically.

## Summary

- Execute `git pull origin main` followed by `uv sync` to update Marin to the latest version efficiently
- The [`pyproject.toml`](https://github.com/marin-community/marin/blob/main/pyproject.toml) file defines workspace members that `uv sync` manages automatically
- Verify successful updates by checking package versions and running the test suite via [`infra/ci/run_tests.py`](https://github.com/marin-community/marin/blob/main/infra/ci/run_tests.py)
- For targeted updates, use `uv sync -p <workspace-path>` to rebuild individual components
- Containerized environments require image rebuilds rather than direct `uv sync` execution

## Frequently Asked Questions

### What is the fastest way to update Marin to the latest version?

The fastest method is running `git pull origin main` immediately followed by `uv sync` from the repository root. According to the marin-community/marin source code, this combination updates both the source code and all inter-dependent workspace packages in seconds without manual dependency resolution.

### How do I update only one Marin workspace instead of the entire monorepo?

Use the workspace-specific flag: `uv sync -p lib/levanter` (replace `levanter` with your target workspace). This rebuilds only that specific component while maintaining compatibility with the core marin system, saving time when you only need updates from a single library.

### Why does Marin use uv instead of pip for updates?

The marin-community/marin repository uses uv because it handles the complex monorepo structure more efficiently than pip. As defined in [`pyproject.toml`](https://github.com/marin-community/marin/blob/main/pyproject.toml), uv synchronizes all workspace members automatically, ensuring that marin-iris, marin-levanter, and marin-zephyr remain version-compatible without manual intervention.

### How can I verify that Marin updated correctly?

Run `python -c "import marin, levanter; print(marin.__version__)"` to check runtime versions, then execute `uv run --no-project infra/ci/run_tests.py` to validate functionality against the test suite. If both commands succeed without errors, your update to the latest version is complete and stable.