What Are the Dependencies for Marin? Complete Guide to the Python Workspace
Marin is a multi-workspace Python project whose dependencies are defined across a root pyproject.toml and multiple workspace member manifests under lib/, requiring internal packages like marin-iris and marin-levanter alongside external libraries such as watchdog and pydantic.
Marin is a sophisticated, multi-package Python ecosystem hosted at marin-community/marin. Understanding the dependencies for Marin requires examining both the root project configuration and the individual workspace members that compose the full architecture. This guide breaks down the complete dependency graph, from core runtime requirements to constraint overrides and installation methods.
Core Runtime Dependencies
The root [pyproject.toml](https://github.com/marin-community/marin/blob/main/pyproject.toml) defines the essential packages required to run the base Marin system. These dependencies are declared in the project metadata section and include both internal workspace packages and external utilities.
The primary runtime dependencies specified at lines 12‑44 include:
- Internal workspace packages:
marin-iris,marin-fray,marin-haliax,marin-levanter,marin-core,marin-rigging[secrets],marin-zephyr,marin-finelog,marin-deploy,marin-ducky,marin-dupekit - External monitoring:
watchdogfor filesystem monitoring
These dependencies establish the foundation upon which specific workspace members build their own requirements.
Workspace Members and Sub-Package Dependencies
Marin employs UV workspace support to manage interdependent packages. The workspace structure is defined in the root pyproject.toml at lines 26‑42, enumerating members across the lib/ and infra/ directories:
[tool.uv.workspace]
members = [
"lib/iris",
"lib/fray",
"lib/finelog",
"lib/dupekit",
"lib/ducky",
"lib/haliax",
"lib/levanter",
"lib/marin",
"lib/rigging",
"lib/zephyr",
"lib/finestore",
"infra/pulumi",
"infra/buckets",
"infra/deploy",
]
Each workspace member contributes its own dependency manifest, creating a composite dependency graph when the full project is installed.
Dependency Breakdown: marin-iris
The marin-iris package demonstrates how workspace members extend the core dependencies. Defined in [lib/iris/pyproject.toml](https://github.com/marin-community/marin/blob/main/lib/iris/pyproject.toml) at lines 9‑47, it requires:
- Marin internal:
marin-finestore,marin-rigging,marin-finelog,marin-finelog-server,marin-iris-native - CLI and serialization:
click,cloudpickle,pyyaml,cbor2(viazstandardand other compression libs) - Cloud storage:
fsspec,gcsfs,s3fs,google-auth,google-cloud-tpu - Networking:
grpcio,httpx,uvicorn[standard],starlette - Data and authentication:
pydantic,PyJWT[crypto],sqlalchemy,tabulate,typing-extensions,humanfriendly
Other workspace packages like marin-levanter (JAX-based training) and marin-zephyr (dataset pipelines) maintain similar granular dependency lists in their respective pyproject.toml files.
Constraint and Override Dependencies
Marin manages complex version requirements through two specialized sections in the root manifest: constraints for pre-release packages and overrides for forced version pins.
Pre-Release Constraints
Located at lines 58‑66, these dependencies are enabled only when pre-release versions are allowed:
tfp-nightly>=0.1.dev0opentelemetry-instrumentation>=0.41b0opentelemetry-instrumentation-grpc>=0.41b0opentelemetry-semantic-conventions>=0.1b0
Forced Version Overrides
The override section at lines 68‑99 forces specific minimum versions to resolve upstream compatibility issues:
- Configuration:
omegaconf>=2.4.0.dev4 - AI/ML libraries:
anthropic>=0.71.0,litellm>=1.83.14,tiktoken>=0.12.0 - Web framework components:
gradio>=6.14.0,aiofiles>=24.1.0,python-multipart>=0.0.27 - Jupyter ecosystem:
jupyter-server>=2.18.2,jupyterlab>=4.5.7,notebook>=7.5.6 - Infrastructure:
ray>=2.55.1,datasets>=3.1.0,<5.0.0,equinox>=0.11.10
Optional Extras and Conflict Rules
The Marin dependency tree includes optional extras that enable specific hardware accelerators or authentication methods. The root pyproject.toml declares a conflict matrix at lines 100‑124 to prevent incompatible combinations (such as mixing GPU-only and TPU-only extras across different packages).
Key optional configurations include:
marin-rigging[secrets]: Required for secret-driven cluster startupmarin-rigging[iap]: Optional Identity-Aware Proxy login support- Hardware extras:
--extra=cpu,--extra=gpu, or--extra=tpuflags for UV installation
Installing Marin with UV
The Marin project uses UV for dependency resolution and workspace management. To install the complete dependency graph including all workspace members:
# Sync the full workspace with all internal packages
uv sync --all-packages --extra=cpu
For GPU or TPU support, substitute the appropriate extra flag:
uv sync --all-packages --extra=gpu
# or
uv sync --all-packages --extra=tpu
To install only specific workspace members without the full ecosystem:
uv pip install ./lib/iris
Alternatively, to install just the core runtime without workspace development dependencies:
pip install marin-root
Summary
- Marin dependencies are distributed across a root
pyproject.tomland multiple workspace member manifests underlib/. - Core runtime requires internal packages like
marin-iris,marin-levanter, and external tools likewatchdog(lines 12‑44). - Workspace members such as
lib/irisandlib/levanterdefine their own granular dependency sets for cloud storage, ML frameworks, and networking. - Constraint and override sections manage pre-release packages (
tfp-nightly, OpenTelemetry) and force minimum versions for critical libraries (anthropic,gradio,ray). - Installation requires UV with
--all-packagesflag to resolve the workspace graph correctly.
Frequently Asked Questions
What package manager should I use to install Marin dependencies?
Use UV to install Marin. The project is structured as a UV workspace, and the uv sync command correctly resolves interdependencies between the root package and workspace members like marin-iris and marin-levanter. Standard pip can install individual packages but may not resolve workspace-internal dependencies correctly.
Where are the hardware-specific dependencies defined in Marin?
Hardware-specific dependencies (CPU, GPU, TPU) are managed through optional extras in the root pyproject.toml and individual workspace members. The conflict matrix at lines 100‑124 prevents mixing incompatible hardware extras, while marin-levanter's manifest contains JAX-related dependencies for accelerator support.
Can I install a single workspace member without the full Marin dependency tree?
Yes. Navigate to the specific workspace directory (e.g., lib/iris/) and run uv pip install . or pip install . to install only that package's dependencies. However, note that internal Marin dependencies (like marin-rigging) will still resolve from the workspace if not available on PyPI.
What is the purpose of the override dependencies in Marin's pyproject.toml?
The override section (lines 68‑99) forces specific minimum versions to resolve upstream compatibility issues with transitive dependencies. This ensures critical packages like omegaconf, anthropic, and ray meet version requirements even if other packages in the tree specify lower bounds.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →