Skip to content

Commit fc490c0

Browse files
committed
Added gpu and healthcheck to vllm server, added vllm test server
1 parent 25cdd90 commit fc490c0

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

docker-compose.components.test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,23 @@ services:
4040
gemini-video-summarization:
4141
<<: *test-args
4242

43+
gemini-video-summarization-vllm-tests:
44+
image: ${REGISTRY}openmpf_gemini_video_summarization_tests:${TAG}
45+
build:
46+
context: ${OPENMPF_PROJECTS_PATH}/openmpf-components/python/GeminiVideoSummarization
47+
target: vllm-tests
48+
args:
49+
BUILD_REGISTRY: ${REGISTRY}
50+
BUILD_TAG: ${TAG}
51+
RUN_TESTS: 'true'
52+
environment:
53+
RUN_VLLM_TESTS: 'true'
54+
GEMINI_TEST_OPENAI_BASE_URL: http://gemini-video-summarization-server:8000/v1
55+
GEMINI_TEST_MODEL_NAME: ${GEMINI_MODEL_NAME:-google/gemma-4-12B-it}
56+
depends_on:
57+
gemini-video-summarization-server:
58+
condition: service_healthy
59+
4360
mog-motion-detection:
4461
<<: *test-args
4562

docker-compose.components.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ services:
151151
MPF_PROP_PROCESS_FPS: ${GEMINI_PROCESS_FPS:-1.0}
152152
MPF_PROP_OPENAI_REQUEST_TIMEOUT_SECONDS: ${GEMINI_OPENAI_REQUEST_TIMEOUT_SECONDS:-600}
153153
depends_on:
154-
- workflow-manager
155-
- gemini-video-summarization-server
154+
workflow-manager:
155+
condition: service_started
156+
gemini-video-summarization-server:
157+
condition: service_healthy
156158

157159
gemini-video-summarization-server:
158160
image: ${REGISTRY}openmpf_gemini_video_summarization_server:${TAG}
@@ -162,14 +164,20 @@ services:
162164
ipc: host
163165
volumes:
164166
- ${GEMINI_HF_CACHE:-${HOME}/.cache/huggingface}:/root/.cache/huggingface
167+
healthcheck:
168+
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "5", "http://localhost:8000/health"]
169+
interval: 10s
170+
timeout: 6s
171+
retries: 120
172+
start_period: 30s
165173
deploy:
166174
mode: global
167-
# resources:
168-
# reservations:
169-
# devices:
170-
# - driver: nvidia
171-
# device_ids: ['0']
172-
# capabilities: [gpu]
175+
resources:
176+
reservations:
177+
devices:
178+
- driver: nvidia
179+
device_ids: ['0']
180+
capabilities: [gpu]
173181

174182
fasttext-language-detection:
175183
<<: *component-base

0 commit comments

Comments
 (0)