Skip to content

Commit bf30414

Browse files
committed
feat(vllm): add vLLM integration
1 parent 640b67e commit bf30414

33 files changed

+2999
-8
lines changed

.gitlab/testrunner.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
variables:
22
TESTRUNNER_IMAGE: registry.ddbuild.io/dd-trace-py:v73166438-4077fc2-testrunner-2025.08.08@sha256:456e32d2fdc19569fb34d705d1ccf193c179cc5364d1f93e60f825d189647c3d
3+
TESTRUNNER_GPU_IMAGE: ${TESTRUNNER_IMAGE}
34

45
.testrunner:
56
image:
@@ -18,3 +19,23 @@ variables:
1819
artifacts:
1920
reports:
2021
junit: test-results/junit*.xml
22+
23+
.testrunner_gpu:
24+
image:
25+
name: ${TESTRUNNER_GPU_IMAGE}
26+
docker:
27+
user: bits
28+
# Use GPU-enabled runners
29+
tags: [ "gpu:a10-amd64" ]
30+
timeout: 40m
31+
before_script:
32+
- ulimit -c unlimited
33+
- git config --global --add safe.directory ${CI_PROJECT_DIR}
34+
- pyenv global 3.12 3.8 3.9 3.10 3.11 3.13
35+
- export _CI_DD_AGENT_URL=http://${HOST_IP}:8126/
36+
- export NVIDIA_VISIBLE_DEVICES=all
37+
- export NVIDIA_DRIVER_CAPABILITIES=compute,utility
38+
retry: 2
39+
artifacts:
40+
reports:
41+
junit: test-results/junit*.xml

.gitlab/tests.yml

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ include:
4343
DD_FAST_BUILD = "1"
4444

4545

46-
4746
.test_base_hatch_snapshot:
4847
extends: .test_base_hatch
4948
services:
@@ -54,6 +53,49 @@ include:
5453
# agent at that host. Therefore setting this as a variable will cause recursive requests to the testagent
5554
- export DD_TRACE_AGENT_URL="http://testagent:9126"
5655

56+
# GPU variants of base templates
57+
.test_base_hatch_gpu:
58+
extends: .testrunner_gpu
59+
stage: hatch
60+
needs: [ prechecks ]
61+
parallel: 2
62+
variables:
63+
# Request==Limit to achieve Guaranteed QoS; requires Kubernetes executor support
64+
KUBERNETES_MEMORY_REQUEST: "12Gi"
65+
KUBERNETES_MEMORY_LIMIT: "12Gi"
66+
KUBERNETES_CPU_REQUEST: "2"
67+
KUBERNETES_CPU_LIMIT: "2"
68+
before_script:
69+
- !reference [.testrunner_gpu, before_script]
70+
script:
71+
- export PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --ddtrace"
72+
- export _DD_CIVISIBILITY_USE_CI_CONTEXT_PROVIDER=true
73+
- export DD_FAST_BUILD="1"
74+
- |
75+
envs=( $(hatch env show --json | jq -r --arg suite_name "$SUITE_NAME" 'keys[] | select(. | contains($suite_name))' | sort | ./.gitlab/ci-split-input.sh) )
76+
if [[ ${#envs[@]} -eq 0 ]]; then
77+
echo "No hatch envs found for ${SUITE_NAME}"
78+
exit 1
79+
fi
80+
for env in "${envs[@]}"
81+
do
82+
echo "Running hatch env (GPU): ${env}:test"
83+
hatch run ${env}:test
84+
done
85+
variables:
86+
CMAKE_BUILD_PARALLEL_LEVEL = "12"
87+
CARGO_BUILD_JOBS = "12"
88+
DD_FAST_BUILD = "1"
89+
PIP_EXTRA_INDEX_URL = "https://download.pytorch.org/whl/cu124"
90+
91+
.test_base_hatch_gpu_snapshot:
92+
extends: .test_base_hatch_gpu
93+
services:
94+
- !reference [.services, testagent]
95+
before_script:
96+
- !reference [.test_base_hatch_gpu, before_script]
97+
- export DD_TRACE_AGENT_URL="http://testagent:9126"
98+
5799
# Do not define a `needs:` in order to depend on the whole `precheck` stage
58100
.test_base_riot:
59101
extends: .testrunner
@@ -101,4 +143,51 @@ include:
101143
- export DD_TRACE_AGENT_URL="http://testagent:9126"
102144
- ln -s "${CI_PROJECT_DIR}" "/home/bits/project"
103145

146+
.test_base_riot_gpu:
147+
extends: .testrunner_gpu
148+
stage: riot
149+
needs: [ build_base_venvs, prechecks ]
150+
parallel: 2
151+
variables:
152+
KUBERNETES_MEMORY_REQUEST: "12Gi"
153+
KUBERNETES_MEMORY_LIMIT: "12Gi"
154+
KUBERNETES_CPU_REQUEST: "2"
155+
KUBERNETES_CPU_LIMIT: "2"
156+
services:
157+
- !reference [.services, ddagent]
158+
before_script:
159+
- !reference [.testrunner_gpu, before_script]
160+
- unset DD_SERVICE
161+
- unset DD_ENV
162+
- unset DD_TAGS
163+
- unset DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED
164+
script:
165+
- |
166+
hashes=( $(.gitlab/scripts/get-riot-hashes.sh "${SUITE_NAME}") )
167+
if [[ ${#hashes[@]} -eq 0 ]]; then
168+
echo "No riot hashes found for ${SUITE_NAME}"
169+
exit 1
170+
fi
171+
for hash in "${hashes[@]}"
172+
do
173+
echo "Running riot hash (GPU): ${hash}"
174+
riot list "${hash}"
175+
export _CI_DD_TAGS="test.configuration.riot_hash:${hash}"
176+
${RIOT_RUN_CMD} "${hash}" -- --ddtrace
177+
done
178+
./scripts/check-diff ".riot/requirements/" \
179+
"Changes detected after running riot. Consider deleting changed files, running scripts/compile-and-prune-test-requirements and committing the result."
180+
./scripts/check-diff "ddtrace/contrib/integration_registry/registry.yaml" \
181+
"Registry YAML file (ddtrace/contrib/integration_registry/registry.yaml) was modified. Please run: scripts/integration_registry/update_and_format_registry.py and commit the changes."
182+
183+
.test_base_riot_gpu_snapshot:
184+
extends: .test_base_riot_gpu
185+
services:
186+
- !reference [.test_base_riot_gpu, services]
187+
- !reference [.services, testagent]
188+
before_script:
189+
- !reference [.test_base_riot_gpu, before_script]
190+
- export DD_TRACE_AGENT_URL="http://testagent:9126"
191+
- ln -s "${CI_PROJECT_DIR}" "/home/bits/project"
192+
104193
# Required jobs will appear here

.riot/requirements/1a4761c.txt

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1a4761c.in
6+
#
7+
aiohappyeyeballs==2.6.1
8+
aiohttp==3.12.15
9+
aiosignal==1.4.0
10+
annotated-types==0.7.0
11+
anyio==4.11.0
12+
astor==0.8.1
13+
attrs==25.3.0
14+
blake3==1.0.6
15+
cachetools==6.2.0
16+
cbor2==5.7.0
17+
certifi==2025.8.3
18+
cffi==2.0.0
19+
charset-normalizer==3.4.3
20+
click==8.3.0
21+
cloudpickle==3.1.1
22+
compressed-tensors==0.10.2
23+
coverage[toml]==7.10.7
24+
cupy-cuda12x==13.6.0
25+
depyf==0.19.0
26+
dill==0.4.0
27+
diskcache==5.6.3
28+
distro==1.9.0
29+
dnspython==2.8.0
30+
einops==0.8.1
31+
email-validator==2.3.0
32+
fastapi[standard]==0.117.1
33+
fastapi-cli[standard]==0.0.13
34+
fastapi-cloud-cli==0.2.0
35+
fastrlock==0.8.3
36+
filelock==3.19.1
37+
frozenlist==1.7.0
38+
fsspec==2025.9.0
39+
gguf==0.17.1
40+
h11==0.16.0
41+
hf-xet==1.1.10
42+
httpcore==1.0.9
43+
httptools==0.6.4
44+
httpx==0.28.1
45+
huggingface-hub==0.35.1
46+
hypothesis==6.45.0
47+
idna==3.10
48+
iniconfig==2.1.0
49+
interegular==0.3.3
50+
jinja2==3.1.6
51+
jiter==0.11.0
52+
jsonschema==4.25.1
53+
jsonschema-specifications==2025.9.1
54+
lark==1.2.2
55+
llguidance==0.7.30
56+
llvmlite==0.44.0
57+
lm-format-enforcer==0.10.12
58+
markdown-it-py==4.0.0
59+
markupsafe==3.0.2
60+
mdurl==0.1.2
61+
mistral-common[audio,image,opencv,soundfile,soxr]==1.8.5
62+
mock==5.2.0
63+
mpmath==1.3.0
64+
msgpack==1.1.1
65+
msgspec==0.19.0
66+
multidict==6.6.4
67+
networkx==3.5
68+
ninja==1.13.0
69+
numba==0.61.2
70+
numpy==2.2.6
71+
nvidia-cublas-cu12==12.6.4.1
72+
nvidia-cuda-cupti-cu12==12.6.80
73+
nvidia-cuda-nvrtc-cu12==12.6.77
74+
nvidia-cuda-runtime-cu12==12.6.77
75+
nvidia-cudnn-cu12==9.5.1.17
76+
nvidia-cufft-cu12==11.3.0.4
77+
nvidia-cufile-cu12==1.11.1.6
78+
nvidia-curand-cu12==10.3.7.77
79+
nvidia-cusolver-cu12==11.7.1.2
80+
nvidia-cusparse-cu12==12.5.4.2
81+
nvidia-cusparselt-cu12==0.6.3
82+
nvidia-nccl-cu12==2.26.2
83+
nvidia-nvjitlink-cu12==12.6.85
84+
nvidia-nvtx-cu12==12.6.77
85+
openai==1.109.1
86+
openai-harmony==0.0.4
87+
opencv-python-headless==4.12.0.88
88+
opentracing==2.4.0
89+
outlines-core==0.2.10
90+
packaging==25.0
91+
partial-json-parser==0.2.1.1.post6
92+
pillow==11.3.0
93+
pluggy==1.6.0
94+
prometheus-client==0.23.1
95+
prometheus-fastapi-instrumentator==7.1.0
96+
propcache==0.3.2
97+
protobuf==6.32.1
98+
psutil==7.1.0
99+
py-cpuinfo==9.0.0
100+
pybase64==1.4.2
101+
pycountry==24.6.1
102+
pycparser==2.23
103+
pydantic[email]==2.11.9
104+
pydantic-core==2.33.2
105+
pydantic-extra-types[pycountry]==2.10.5
106+
pygments==2.19.2
107+
pytest==8.4.2
108+
pytest-asyncio==0.21.1
109+
pytest-cov==7.0.0
110+
pytest-mock==3.15.1
111+
pytest-randomly==4.0.1
112+
python-dotenv==1.1.1
113+
python-json-logger==3.3.0
114+
python-multipart==0.0.20
115+
pyyaml==6.0.2
116+
pyzmq==27.1.0
117+
ray[cgraph]==2.49.2
118+
referencing==0.36.2
119+
regex==2025.9.18
120+
requests==2.32.5
121+
rich==14.1.0
122+
rich-toolkit==0.15.1
123+
rignore==0.6.4
124+
rpds-py==0.27.1
125+
safetensors==0.6.2
126+
scipy==1.16.2
127+
sentencepiece==0.2.1
128+
sentry-sdk==2.38.0
129+
setproctitle==1.3.7
130+
shellingham==1.5.4
131+
six==1.17.0
132+
sniffio==1.3.1
133+
sortedcontainers==2.4.0
134+
soundfile==0.13.1
135+
soxr==1.0.0
136+
starlette==0.48.0
137+
sympy==1.14.0
138+
tiktoken==0.11.0
139+
tokenizers==0.22.1
140+
torch==2.7.1
141+
torchaudio==2.7.1
142+
torchvision==0.22.1
143+
tqdm==4.67.1
144+
transformers==4.56.2
145+
triton==3.3.1
146+
typer==0.19.2
147+
typing-extensions==4.15.0
148+
typing-inspection==0.4.1
149+
urllib3==2.5.0
150+
uvicorn[standard]==0.37.0
151+
uvloop==0.21.0
152+
vllm==0.10.1
153+
watchfiles==1.1.0
154+
websockets==15.0.1
155+
xformers==0.0.31
156+
xgrammar==0.1.21
157+
yarl==1.20.1
158+
159+
# The following packages are considered to be unsafe in a requirements file:
160+
setuptools==79.0.1

0 commit comments

Comments
 (0)