File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -250,41 +250,41 @@ def download_s5cmd():
250
250
# Check if s5cmd already exists
251
251
if os .path .exists (S5CMD_PATH ):
252
252
return S5CMD_PATH
253
-
253
+
254
254
s5cmd_url = "https://aws-gcr-solutions-us-east-1.s3.us-east-1.amazonaws.com/easy-model-deployer/pipeline/s5cmd.zip"
255
-
255
+
256
256
try :
257
257
# Download and extract
258
258
zip_path = S5CMD_PATH + ".zip"
259
259
urllib .request .urlretrieve (s5cmd_url , zip_path )
260
-
260
+
261
261
with zipfile .ZipFile (zip_path , 'r' ) as zip_ref :
262
262
zip_ref .extractall ("." )
263
-
263
+
264
264
os .remove (zip_path ) # Clean up zip file
265
-
265
+
266
266
# Make s5cmd executable
267
267
if os .path .exists (S5CMD_PATH ):
268
268
os .chmod (S5CMD_PATH , os .stat (S5CMD_PATH ).st_mode | 0o755 )
269
269
return S5CMD_PATH
270
270
else :
271
271
raise FileNotFoundError ("Required component(s5cmd) installation failed" )
272
-
272
+
273
273
except Exception as e :
274
274
raise RuntimeError ("Required component(s5cmd) download failed" )
275
275
276
276
if __name__ == "__main__" :
277
277
t0 = time .time ()
278
278
start_time = time .time ()
279
279
args = parse_args ()
280
-
280
+
281
281
# Download s5cmd
282
282
download_s5cmd ()
283
283
284
284
if not os .path .exists (S5CMD_PATH ):
285
285
logger .error ("Required component(s5cmd) not found" )
286
286
sys .exit (1 )
287
-
287
+
288
288
os .chmod (S5CMD_PATH , os .stat (S5CMD_PATH ).st_mode | 0o100 )
289
289
extra_params = args .extra_params
290
290
for k ,v in extra_params .items ():
You can’t perform that action at this time.
0 commit comments