From 81f26173b88a7b529c648f0c0e6bc4dbb90c454f Mon Sep 17 00:00:00 2001 From: Maciej Wielgosz <maciej.wielgosz@nibio.no> Date: Wed, 21 Jun 2023 08:24:12 +0200 Subject: [PATCH] zipping the output for the oracle cloud --- run_oracle_wrapper.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/run_oracle_wrapper.py b/run_oracle_wrapper.py index 097808e..4844d69 100644 --- a/run_oracle_wrapper.py +++ b/run_oracle_wrapper.py @@ -26,14 +26,14 @@ def run_oracle_wrapper(path_to_config_file): client = ObjectStorageClient(config) # read system environment variables - # input_location = os.environ['OBJ_INPUT_LOCATION'] - # output_location = os.environ['OBJ_OUTPUT_LOCATION'] + input_location = os.environ['OBJ_INPUT_LOCATION'] + output_location = os.environ['OBJ_OUTPUT_LOCATION'] # input_location = "oci://maciej-seg-test-in@axqlz2potslu/las_files" # output_location = "oci://maciej-seg-test-out@axqlz2potslu" - input_location = "oci://forestsens_temp@axqlz2potslu/acc_6/batch_274/original_las_files" - output_location = "oci://maciej-seg-test-out@axqlz2potslu" + # input_location = "oci://forestsens_temp@axqlz2potslu/acc_6/batch_274/original_las_files" + # output_location = "oci://maciej-seg-test-out@axqlz2potslu" # doing for the input @@ -129,6 +129,11 @@ def run_oracle_wrapper(path_to_config_file): else: path_to_the_output_folder = config_flow_params['general']['output_folder'] + # zip the files in path_to_the_output_folder + zip_file_name = 'results' + shutil.make_archive(zip_file_name, 'zip', path_to_the_output_folder) # this will be done in the current folder + shutil.copy('results.zip', path_to_the_output_folder) + # get list of files in the output folder list_of_files = os.listdir(path_to_the_output_folder) -- GitLab