Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "vLLM",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"features": {
"ghcr.io/devcontainers-extra/features/uv:1.0.2": {},
"ghcr.io/devcontainers/features/rust:1.6.0": {},
"ghcr.io/devcontainers/features/github-cli:1.1.3": {}
},
"remoteUser": "vscode",
"mounts": [
"source=vllm-devcontainer-cache,target=/home/vscode/.cache,type=volume"
],
"containerEnv": {
"UV_LINK_MODE": "copy"
},
"postCreateCommand": "uv pip install --system -r requirements/lint.txt && VLLM_USE_PRECOMPILED=1 uv pip install --system -e . --torch-backend=auto && pre-commit install"
}
25 changes: 25 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": ["devcontainer"],
"dependencyDashboard": true,
"labels": ["dependencies"],
"schedule": ["before 6am on monday"],
"packageRules": [
{
"matchManagers": ["devcontainer"],
"matchDepTypes": ["image"],
"matchPackageNames": ["mcr.microsoft.com/devcontainers/python"],
"groupName": "devcontainer base image"
},
{
"matchManagers": ["devcontainer"],
"matchDepTypes": ["feature"],
"matchPackageNames": [
"ghcr.io/devcontainers-extra/features/uv",
"ghcr.io/devcontainers/features/rust",
"ghcr.io/devcontainers/features/github-cli"
],
"groupName": "devcontainer features"
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Dev container

on:
pull_request:
paths:
- ".devcontainer/**"
- "requirements/lint.txt"
- ".github/workflows/devcontainer.yml"
push:
branches: [main]
paths:
- ".devcontainer/**"
- "requirements/lint.txt"
- ".github/workflows/devcontainer.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: devcontainers/ci@513af61f4de4f75d37e4438f184ba4358f0fc1ca # v0.3.1900000450
with:
push: never
runCmd: |
set -euo pipefail
uv --version
python --version | grep -F "Python 3.12"
python -c "import vllm"
pre-commit --version
test -f .git/hooks/pre-commit
18 changes: 18 additions & 0 deletions docs/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ Then, configure your Python virtual environment.

--8<-- "docs/getting_started/installation/python_env_setup.inc.md"

!!! tip "Dev container"
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/vllm-project/vllm)
[![Dev container build](https://github.com/vllm-project/vllm/actions/workflows/devcontainer.yml/badge.svg?branch=main)](https://github.com/vllm-project/vllm/actions/workflows/devcontainer.yml)

A CPU-only VS Code dev container is available for editing and linting without a GPU.
Open the Command Palette and run **Dev Containers: Reopen in Container**. The badge
above clones `vllm-project/vllm` into a container volume; to work on a fork, clone
it locally and use **Reopen in Container** instead.

On first creation it installs `uv`, creates a uv-managed Python 3.12 venv at `.venv`
inside a Docker volume (separate from any host `.venv`), and installs
`requirements/lint.txt`. On every start it also runs `pre-commit install`.

**Limitations:** no GPU support; not for CUDA/C++ builds or GPU tests; Pylance will
report unresolved imports for packages not installed in the container (e.g. `torch`).
If you also commit from the host, run `pre-commit install` again on the host after
using the container — the container rewrites `.git/hooks` with container-internal paths.

If you are only developing vLLM's Python code, install vLLM using:

```bash
Expand Down
Loading