@@ -175,23 +175,22 @@ def build(args):
175
175
else :
176
176
cuda_suffix = "-gpu"
177
177
178
- system_str = ""
178
+ system_pkg_list = []
179
179
if (
180
180
"system_packages" in build_params
181
181
and not build_params ["system_packages" ] is None
182
182
):
183
- for p in build_params ["system_packages" ]:
184
- system_str += p + " "
183
+ system_pkg_list . extend ( build_params ["system_packages" ])
184
+ system_pkg_str = " " . join ( system_pkg_list )
185
185
186
- packages_str = ""
186
+ python_pkg_list = []
187
187
if (
188
188
"python_packages" in build_params
189
189
and not build_params ["python_packages" ] is None
190
190
):
191
- for p in build_params ["python_packages" ]:
192
- packages_str += p + " "
193
- for p in DEFAULT_DEPENDENCIES :
194
- packages_str += p + " "
191
+ python_pkg_list .extend (build_params ["python_packages" ])
192
+ python_pkg_list .extend (DEFAULT_DEPENDENCIES )
193
+ python_pkg_str = " " .join (python_pkg_list )
195
194
196
195
with tempfile .TemporaryDirectory () as tmpdir :
197
196
shutil .copyfile (
@@ -222,9 +221,9 @@ def build(args):
222
221
"--build-arg" ,
223
222
f"CUDA_SUFFIX={ cuda_suffix } " ,
224
223
"--build-arg" ,
225
- f"PACKAGES={ packages_str } " ,
224
+ f"PACKAGES={ python_pkg_str } " ,
226
225
"--build-arg" ,
227
- f"SYSTEM_PACKAGES={ system_str } " ,
226
+ f"SYSTEM_PACKAGES={ system_pkg_str } " ,
228
227
"--build-arg" ,
229
228
f"SDK_VERSION={ instill_version } " ,
230
229
"--platform" ,
0 commit comments