Skip to content
Snippets Groups Projects
Commit 48e3b042 authored by Maciej Wielgosz's avatar Maciej Wielgosz
Browse files

fix for creating output folder in the oracle if does not exist

parent 392236ea
Branches
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment