-
Notifications
You must be signed in to change notification settings - Fork 312
198 lines (190 loc) · 11.6 KB
/
Copy pathtest.nvidia_t4.yml
File metadata and controls
198 lines (190 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: Code Quality & Regression Tests - NVIDIA T4
permissions:
contents: read
on:
push:
branches: [main]
workflow_dispatch:
inputs:
test_name:
description: 'Name of specific test to run. Leave empty to run all tests.'
required: false
default: ''
type: choice
options:
- ''
- regression_without_torch
- regression_with_torch
- paligemma
- florence
- sam2
- sam3
- moondream2
use-inference-models:
description: "USE_INFERENCE_MODELS value (or all)"
type: choice
default: all
options:
- all
- "true"
- "false"
jobs:
build:
if: ${{ !github.event.act }}
runs-on: Roboflow-GPU-VM-Runner
strategy:
matrix:
use-inference-models: ${{ fromJSON((github.event.inputs.use-inference-models || 'all') == 'all'&& '["true","false"]'|| format('["{0}"]', github.event.inputs.use-inference-models)) }}
timeout-minutes: 120
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: 🛎️ Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: 🦾 Install dependencies
run: |
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements/requirements.test.integration.txt -r requirements/requirements.test.unit.txt
- name: �🔨 Build and Push Test Docker - GPU
run: |
docker build -t roboflow/roboflow-inference-server-gpu:test -f docker/dockerfiles/Dockerfile.onnx.gpu .
- name: Verify CUDA OpenCV - GPU
if: ${{ github.event.inputs.test_name == '' }}
run: |
docker run --rm --gpus all --entrypoint sh \
-e OPENCV_REQUIRE_CUDA_BUILD=true \
-e OPENCV_REQUIRE_CUDA_RUNTIME=true \
-v "$PWD/docker/scripts/verify_opencv.sh:/tmp/verify_opencv:ro" \
roboflow/roboflow-inference-server-gpu:test \
/tmp/verify_opencv
- name: Verify NVIDIA GStreamer codecs - GPU
if: ${{ github.event.inputs.test_name == '' }}
run: |
docker run --rm --gpus all --entrypoint sh \
-e GSTREAMER_REQUIRE_NVCODEC=true \
-e GSTREAMER_REQUIRE_NVCODEC_RUNTIME=true \
-v "$PWD/docker/scripts/verify_gstreamer.sh:/tmp/verify_gstreamer:ro" \
roboflow/roboflow-inference-server-gpu:test \
/tmp/verify_gstreamer
- name: Verify CUDA GStreamer tensor bridge - GPU
if: ${{ github.event.inputs.test_name == '' }}
run: |
docker run --rm --gpus all --entrypoint python3 \
-v "$PWD/docker/scripts/verify_gstreamer_cuda_tensor_runtime.py:/tmp/verify_gstreamer_cuda_tensor_runtime.py:ro" \
roboflow/roboflow-inference-server-gpu:test \
/tmp/verify_gstreamer_cuda_tensor_runtime.py
- name: 🔋 Start Test Docker without Torch Preprocessing - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_without_torch' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 USE_PYTORCH_FOR_PREPROCESSING=False INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Tests without Torch Preprocessing - GPU
id: regression_tests_without_torch
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_without_torch' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} MINIMUM_FPS=25 FUNCTIONAL=true PORT=9101 SKIP_LMM_TEST=True API_KEY=${{ secrets.API_KEY }} asl_instance_segmentation_API_KEY=${{ secrets.ASL_INSTANCE_SEGMENTATION_API_KEY }} asl_poly_instance_seg_API_KEY=${{ secrets.ASL_POLY_INSTANCE_SEG_API_KEY }} bccd_favz3_API_KEY=${{ secrets.BCCD_FAVZ3_API_KEY }} bccd_i4nym_API_KEY=${{ secrets.BCCD_I4NYM_API_KEY }} cats_and_dogs_smnpl_API_KEY=${{ secrets.CATS_AND_DOGS_SMNPL_API_KEY }} coins_xaz9i_API_KEY=${{ secrets.COINS_XAZ9I_API_KEY }} melee_API_KEY=${{ secrets.MELEE_API_KEY }} yolonas_test_API_KEY=${{ secrets.YOLONAS_TEST_API_KEY }} python3 -m pytest tests/inference/integration_tests/
- name: 🧹 Cleanup Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_without_torch' }}
run: make stop_test_docker
- name: 🔋 Start Test Docker with Torch Preprocessing - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_with_torch' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 USE_PYTORCH_FOR_PREPROCESSING=True INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Tests with Torch Preprocessing - GPU
id: regression_tests_with_torch
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_with_torch' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} MINIMUM_FPS=25 FUNCTIONAL=true PORT=9101 SKIP_LMM_TEST=True API_KEY=${{ secrets.API_KEY }} asl_instance_segmentation_API_KEY=${{ secrets.ASL_INSTANCE_SEGMENTATION_API_KEY }} asl_poly_instance_seg_API_KEY=${{ secrets.ASL_POLY_INSTANCE_SEG_API_KEY }} bccd_favz3_API_KEY=${{ secrets.BCCD_FAVZ3_API_KEY }} bccd_i4nym_API_KEY=${{ secrets.BCCD_I4NYM_API_KEY }} cats_and_dogs_smnpl_API_KEY=${{ secrets.CATS_AND_DOGS_SMNPL_API_KEY }} coins_xaz9i_API_KEY=${{ secrets.COINS_XAZ9I_API_KEY }} melee_API_KEY=${{ secrets.MELEE_API_KEY }} yolonas_test_API_KEY=${{ secrets.YOLONAS_TEST_API_KEY }} python3 -m pytest tests/inference/integration_tests/
- name: 🧹 Cleanup Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'regression_with_torch' }}
run: make stop_test_docker
- name: 🔋 Start Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'paligemma' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Paligemma - GPU
id: paligemma_tests
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'paligemma' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 melee_API_KEY=${{ secrets.MELEE_API_KEY }} python3 -m pytest tests/inference/integration_tests/test_paligemma.py
- name: 🧹 Cleanup Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'paligemma' }}
run: make stop_test_docker
- name: 🔋 Start Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'florence' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Florence - GPU
id: florence_tests
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'florence' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 melee_API_KEY=${{ secrets.MELEE_API_KEY }} python3 -m pytest tests/inference/integration_tests/test_florence.py
- name: 🧹 Cleanup Test Docker - GPU
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'florence' }}
run: make stop_test_docker
- name: 🔋 Start Test Docker - SAM2
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam2' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Tests - SAM2
id: sam2_tests
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam2' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 API_KEY=${{ secrets.API_KEY }} SKIP_SAM2_TESTS=False python3 -m pytest tests/inference/integration_tests/test_sam2.py
- name: 🧹 Cleanup Test Docker - SAM2
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam2' }}
run: make stop_test_docker
- name: 🔋 Start Test Docker - SAM3
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam3' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Tests - SAM3
id: sam3_tests
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam3' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 API_KEY=${{ secrets.API_KEY }} SKIP_SAM3_TESTS=False python3 -m pytest tests/inference/integration_tests/test_sam3.py
- name: 🧹 Cleanup Test Docker - SAM3
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'sam3' }}
run: make stop_test_docker
# - name: 🔋 Start Test Docker - GPU
# if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'qwen25' }}
# run: |
# USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
# - name: 🧪 Regression Tests - Qwen2.5
# id: qwen25_tests
# if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'qwen25' }}
# run: |
# source .venv/bin/activate
# PORT=9101 API_KEY=${{ secrets.QWEN_API_KEY }} SKIP_QWEN25_TESTS=False python3 -m pytest tests/inference/integration_tests/qwen_test.py
# - name: 🧹 Cleanup Test Docker - Qwen2.5
# if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'qwen25' }}
# run: make stop_test_docker
- name: 🔋 Start Test Docker - MoonDream
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'moondream2' }}
run: |
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
- name: 🧪 Regression Tests - MoonDream
id: moondream_tests
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'moondream2' }}
run: |
source .venv/bin/activate
USE_INFERENCE_MODELS=${{ matrix.use-inference-models }} PORT=9101 API_KEY=${{ secrets.API_KEY }} SKIP_MOONDREAM2_TEST=False python3 -m pytest tests/inference/integration_tests/test_moondream2.py
- name: 🧹 Cleanup Test Docker - MoonDream
if: ${{ github.event.inputs.test_name == '' || github.event.inputs.test_name == 'moondream2' }}
run: make stop_test_docker
- name: 🚨 Show server logs on error
run: |
docker logs inference-test
make stop_test_docker
if: failure()