UR-2.0 provides a user-friendly installation method, allowing users to complete the basic environment setup with just a few commands. At the same time, UR-2.0 supports a modular dependency system with on-demand loading, facilitating flexible expansion of required functional components and avoiding redundant installations.

Step 1: Preparation before installation

Create a virtual environment using Conda:
conda create -n ultrarag python=3.11
conda activate ultrarag
Don’t have Conda installed? Go to Install Miniconda.
We recommend using uv for package management, which provides a faster and more reliable Python dependency management experience:
pip install uv

Step 2: Install the basic environment

We will gradually support PyPI and Conda distributions
Clone the project to your local machine or server via git:
git clone https://github.com/OpenBMB/UltraRAG.git
cd UltraRAG
Create a virtual environment with Conda and install basic dependencies:
uv pip install -e .

Step 3: Verify the installation

Run the following command to test if the installation was successful:
ultrarag run examples/sayhello.yaml
If the environment is correct, the terminal will output a welcome message:

Step 4: Install optional extension components as needed

UR-2.0 supports rich Server components, allowing developers to flexibly install required dependencies according to actual tasks:
# If you want to use faiss for vector indexing:
# You need to manually compile and install different versions of FAISS according to your hardware environment
# Install faiss-cpu
conda install -c pytorch faiss-cpu
# Install faiss-gpu
conda install -c pytorch faiss-gpu

# If you want to use infinity_emb for corpus encoding and indexing:
uv pip install -e ."[infinity_emb]"

# If you want to use lancedb vector database:
uv pip install -e ."[lancedb]"

# If you want to deploy models with vLLM service:
uv pip install -e ."[vllm]"

# If you want to use corpus document parsing features:
uv pip install -e ."[corpus]"

# Install all dependencies (except faiss)
uv pip install -e ."[all]"