Skip to content

Commit 7b49cb1

Browse files
authored
[Doc] update Contributing page's testing section (#18272)
Signed-off-by: David Xia <[email protected]>
1 parent f03e9cf commit 7b49cb1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

docs/contributing/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ See <gh-file:LICENSE>.
2626

2727
## Developing
2828

29+
--8<-- "docs/getting_started/installation/python_env_setup.inc.md"
30+
2931
Depending on the kind of development you'd like to do (e.g. Python, CUDA), you can choose to build vLLM with or without compilation.
3032
Check out the [building from source][build-from-source] documentation for details.
3133

@@ -42,7 +44,7 @@ For an optimized workflow when iterating on C++/CUDA kernels, see the [Increment
4244
Install MkDocs along with the [plugins](https://github.com/vllm-project/vllm/blob/main/mkdocs.yaml) used in the vLLM documentation, as well as required dependencies:
4345

4446
```bash
45-
pip install -r requirements/docs.txt
47+
uv pip install -r requirements/docs.txt
4648
```
4749

4850
!!! note
@@ -98,13 +100,14 @@ For additional features and advanced configurations, refer to the official [MkDo
98100
??? console "Commands"
99101

100102
```bash
101-
pip install -r requirements/common.txt -r requirements/dev.txt
103+
# These commands are only for Nvidia CUDA platforms.
104+
uv pip install -r requirements/common.txt -r requirements/dev.txt --torch-backend=auto
102105

103106
# Linting, formatting and static type checking
104-
pre-commit install --hook-type pre-commit --hook-type commit-msg
107+
pre-commit install
105108

106109
# You can manually run pre-commit with
107-
pre-commit run --all-files
110+
pre-commit run --all-files --show-diff-on-failure
108111

109112
# To manually run something from CI that does not run
110113
# locally by default, you can run:
@@ -122,6 +125,10 @@ For additional features and advanced configurations, refer to the official [MkDo
122125

123126
Therefore, we recommend developing with Python 3.12 to minimise the chance of your local environment clashing with our CI environment.
124127

128+
!!! note "Install python3-dev if Python.h is missing"
129+
If any of the above commands fails with `Python.h: No such file or directory`, install
130+
`python3-dev` with `sudo apt install python3-dev`.
131+
125132
!!! note
126133
Currently, the repository is not fully checked by `mypy`.
127134

@@ -153,7 +160,7 @@ Using `-s` with `git commit` will automatically add this header.
153160

154161
!!! tip
155162
You can enable automatic sign-off via your IDE:
156-
163+
157164
- **PyCharm**: Click on the `Show Commit Options` icon to the right of the `Commit and Push...` button in the `Commit` window.
158165
It will bring up a `git` window where you can modify the `Author` and enable `Sign-off commit`.
159166
- **VSCode**: Open the [Settings editor](https://code.visualstudio.com/docs/configure/settings)

0 commit comments

Comments
 (0)