@@ -200,7 +200,7 @@ def build(self):
200
200
def docker_build (self , context_path , custom_context = False ):
201
201
"""
202
202
Uses Docker Buildx for vLLM images, falls back to legacy Docker API for others
203
-
203
+
204
204
:param context_path: str, Path to build context
205
205
:param custom_context: bool, Whether to use custom context from stdin (default: False)
206
206
:return: int, Build status
@@ -215,13 +215,13 @@ def docker_build(self, context_path, custom_context=False):
215
215
def _is_vllm_image (self ):
216
216
"""
217
217
Determine if current image is a vLLM image
218
-
218
+
219
219
:return: bool, True if this is a vLLM image
220
220
"""
221
221
return (
222
- self .info .get ("framework" ) == "vllm" or
223
- "vllm" in self .repository .lower () or
224
- "vllm" in str (self .info .get ("name" , "" )).lower ()
222
+ self .info .get ("framework" ) == "vllm"
223
+ or "vllm" in self .repository .lower ()
224
+ or "vllm" in str (self .info .get ("name" , "" )).lower ()
225
225
)
226
226
227
227
def _buildx_build (self , context_path , custom_context = False ):
@@ -318,7 +318,7 @@ def _buildx_build(self, context_path, custom_context=False):
318
318
def _legacy_docker_build (self , context_path , custom_context = False ):
319
319
"""
320
320
Uses legacy Docker API Client to build the image (for non-vLLM images).
321
-
321
+
322
322
:param context_path: str, Path to build context
323
323
:param custom_context: bool, Whether to use custom context from stdin (default: False)
324
324
:return: int, Build Status
@@ -331,7 +331,7 @@ def _legacy_docker_build(self, context_path, custom_context=False):
331
331
332
332
line_counter = 0
333
333
line_interval = 50
334
-
334
+
335
335
try :
336
336
for line in self .client .build (
337
337
fileobj = fileobj ,
@@ -378,7 +378,7 @@ def _legacy_docker_build(self, context_path, custom_context=False):
378
378
379
379
self .build_status = constants .SUCCESS
380
380
return self .build_status
381
-
381
+
382
382
except Exception as e :
383
383
response .append (f"Legacy Docker build error: { str (e )} " )
384
384
self .build_status = constants .FAIL
0 commit comments