Skip to content

Commit e38eefe

Browse files
authored
chore(cli): update join pkg str (#248)
Because - update join pkg str This commit - update join pkg str
1 parent aa84a1c commit e38eefe

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

instill/helpers/cli.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,23 +175,22 @@ def build(args):
175175
else:
176176
cuda_suffix = "-gpu"
177177

178-
system_str = ""
178+
system_pkg_list = []
179179
if (
180180
"system_packages" in build_params
181181
and not build_params["system_packages"] is None
182182
):
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)
185185

186-
packages_str = ""
186+
python_pkg_list = []
187187
if (
188188
"python_packages" in build_params
189189
and not build_params["python_packages"] is None
190190
):
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)
195194

196195
with tempfile.TemporaryDirectory() as tmpdir:
197196
shutil.copyfile(
@@ -222,9 +221,9 @@ def build(args):
222221
"--build-arg",
223222
f"CUDA_SUFFIX={cuda_suffix}",
224223
"--build-arg",
225-
f"PACKAGES={packages_str}",
224+
f"PACKAGES={python_pkg_str}",
226225
"--build-arg",
227-
f"SYSTEM_PACKAGES={system_str}",
226+
f"SYSTEM_PACKAGES={system_pkg_str}",
228227
"--build-arg",
229228
f"SDK_VERSION={instill_version}",
230229
"--platform",

0 commit comments

Comments
 (0)