@@ -31,21 +31,66 @@ conda activate dbgpt_env
3131cd DB-GPT
3232```
3333
34- 3 . Install the project from the local source using the following command:
34+ 3 . Install uv package manager:
35+
36+ There are several ways to install uv:
37+
38+ ** Option 1: Using pipx (Recommended)**
39+ ``` bash
40+ python -m pip install --upgrade pip
41+ python -m pip install --upgrade pipx
42+ python -m pipx ensurepath
43+ pipx install uv
3544```
36- # it will take some minutes
37- pip install -e ".[default]"
45+
46+ ** Option 2: Using curl (macOS/Linux)**
47+ ``` bash
48+ curl -LsSf https://astral.sh/uv/install.sh | sh
3849```
3950
40- 4 . Install development requirements
51+ Then verify uv installation:
52+ ``` bash
53+ uv --version
4154```
42- pip install -r requirements/dev-requirements.txt
43- pip install -r requirements/lint-requirements.txt
55+
56+ 4 . Install the project and all dependencies using uv:
57+ ``` bash
58+ # This will install all packages and development dependencies
59+ # it will take some minutes
60+ uv sync --all-packages \
61+ --extra " base" \
62+ --extra " proxy_openai" \
63+ --extra " rag" \
64+ --extra " storage_chromadb" \
65+ --extra " dbgpts"
66+ ```
67+
68+ ** Note for users in China:** If you encounter network issues, you can configure uv to use Chinese mirrors:
69+ ``` bash
70+ # Set environment variable for Tsinghua mirror
71+ export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
72+
73+ # Or add --index-url parameter to the sync command
74+ uv sync --all-packages \
75+ --extra " base" \
76+ --extra " proxy_openai" \
77+ --extra " rag" \
78+ --extra " storage_chromadb" \
79+ --extra " dbgpts" \
80+ --index-url=https://pypi.tuna.tsinghua.edu.cn/simple
4481```
4582
46835 . Install pre-commit hooks
4784```
48- pre-commit install
85+ uv run pre-commit install
86+ ```
87+
88+ ** Important Note:** After using ` uv sync ` , you should use ` uv run ` to execute commands in the virtual environment, or you can activate the environment with:
89+ ``` bash
90+ # Activate the virtual environment
91+ source .venv/bin/activate # On macOS/Linux
92+ # or
93+ .venv\S cripts\a ctivate # On Windows
4994```
5095
51966 . Install ` make ` command
0 commit comments