| sidebar-title | Building from Source |
|---|---|
| description | Build Dynamo from source for development and contributions |
Build Dynamo from source when you want to contribute code, test features on the development branch, or customize the build. If you just want to run Dynamo, the Local Installation guide is faster.
This guide covers Ubuntu and macOS. For a containerized dev environment that handles all of this automatically, see DevContainer.
Ubuntu:
sudo apt install -y build-essential libhwloc-dev libudev-dev pkg-config libclang-dev protobuf-compiler python3-dev cmakemacOS:
# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install cmake protobuf
# Verify Metal is accessible
xcrun -sdk macosx metalcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envInstall uv if you don't have it:
curl -LsSf https://astral.sh/uv/install.sh | shCreate and activate a virtual environment:
uv venv .venv
source .venv/bin/activateuv pip install pip maturinMaturin is the Rust-Python bindings build tool.
cd lib/bindings/python
maturin develop --uv# Return to project root
cd "$(git rev-parse --show-toplevel)"
uv pip install -e lib/gpu_memory_serviceuv pip install -e .python3 -m dynamo.frontend --helpYou should see the frontend command help output.
VSCode and Cursor users can skip manual setup using pre-configured development containers. The DevContainer installs all toolchains, builds the project, and sets up the Python environment automatically.
Framework-specific containers are available for vLLM, SGLang, and TensorRT-LLM. See the DevContainer README for setup instructions.
Before submitting PRs, install the pre-commit hooks to ensure your code passes CI checks:
uv pip install pre-commit
pre-commit installRun checks manually on all files:
pre-commit run --all-filesMissing system packages
If maturin develop fails with linker errors, verify all system dependencies are installed. On Ubuntu:
sudo apt install -y build-essential libhwloc-dev libudev-dev pkg-config libclang-dev protobuf-compiler python3-dev cmakeVirtual environment not activated
Maturin builds against the active Python interpreter. If you see errors about Python or site-packages, ensure your virtual environment is activated:
source .venv/bin/activateDisk space
The Rust target/ directory can grow to 10+ GB during development. If builds fail with disk space errors, clean the build cache:
cargo clean- Contribution Guide -- Workflow for contributing code
- Examples -- Explore the codebase
- Good First Issues -- Find a task to work on