diff --git a/d_run.sh b/d_run.sh index e7ee4266ea9833947f5ee0cb5c8dda4a2881c2ca..0897181cd917dbee806f83c4bbf546b6c56fd4cf 100644 --- a/d_run.sh +++ b/d_run.sh @@ -6,7 +6,7 @@ echo "Running the container" # docker run --gpus all --name test_oracle nibio/pc-geoslam-oracle docker run -it --gpus all \ --name test_oracle \ - --mount type=bind,source=/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_out/las_files,target=/app/local_folder_out/las_files \ + --mount type=bind,source=/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_oracle,target=/app/local_folder_oracle \ nibio/pc-geoslam-oracle diff --git a/run_oracle_wrapper_local.py b/run_oracle_wrapper_local.py index 47083acedc7671ec39d0ea6508873e844c52ab77..83f904947bb157ef7001b038555b81766892cd5b 100644 --- a/run_oracle_wrapper_local.py +++ b/run_oracle_wrapper_local.py @@ -20,10 +20,11 @@ def run_oracle_wrapper(path_to_config_file): # read system environment variables if DEBUG_MODE: - input_location = "local_folder_in/las_files/" - output_location = "local_folder_out/las_files/" - # remove content of the output folder - shutil.rmtree(output_location, ignore_errors=True) + input_location = "local_folder_oracle/las_files/" + output_location = "local_folder_oracle/results/" + # remove content of the output folder if it exists + if os.path.exists(output_location): + shutil.rmtree(output_location, ignore_errors=True) else: # get the input and output locations from the environment variables input_location = os.environ['OBJ_INPUT_LOCATION'] @@ -33,6 +34,9 @@ def run_oracle_wrapper(path_to_config_file): input_location = input_location.replace("@axqlz2potslu", "").replace("oci://", "/mnt/") output_location = output_location.replace("@axqlz2potslu", "").replace("oci://", "/mnt/") + # create the output folder if it does not exist + os.makedirs(output_location, exist_ok=True) + # copy files from input_location to the input folder shutil.copytree(input_location, config_flow_params['general']['input_folder'])