From c37cdfd2186f2887352f556acf0447b8562f18fa Mon Sep 17 00:00:00 2001 From: Maciej Wielgosz <maciej.wielgosz@nibio.no> Date: Mon, 10 Jul 2023 13:14:49 +0200 Subject: [PATCH] updated for oracle block storage usage and deploy --- .dockerignore | 2 ++ .gitignore | 5 ++++- Dockerfile | 11 +++-------- check_list.info | 3 ++- config/config.yaml | 4 ++-- d_run.sh | 4 ++-- run_oracle_wrapper_local.py | 10 +++++----- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.dockerignore b/.dockerignore index 515b24a..13b11d2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ .git build.sh +local_folder_oracle/ +local_folder_oracle_hard/ diff --git a/.gitignore b/.gitignore index e68d29e..9696d0e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,7 @@ sample_data/segmented_point_clouds/* *.dat *.json *.png -*.txt \ No newline at end of file +*.txt +*.log +*.pem +config_oracle \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a4a661e..05b1542 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,17 +37,12 @@ RUN pip install parse oci ocifs COPY requirements.txt app/requirements.txt RUN pip install --no-cache -r app/requirements.txt -# COPY . /app -# WORKDIR /app +COPY . /app -COPY . /home/datascience/app -WORKDIR /home/datascience/app +WORKDIR /app -# ENTRYPOINT ["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper.py"] +ENTRYPOINT ["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper_local.py"] -# ENTRYPOINT ["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper_local.py"] - -ENTRYPOINT ["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/home/datascience/app/run_oracle_wrapper_local.py"] diff --git a/check_list.info b/check_list.info index a5ae4cc..5ef2b13 100644 --- a/check_list.info +++ b/check_list.info @@ -1,10 +1,11 @@ Dockerfile - set correct oracle wrapper -# core steps +### core steps build.sh run_oracle_wrapper.py or run_oracle_wrapper_local.py -> pick a right mode (DEBUG or not) config.yaml -> pick segmentation or instance segmentation # pushing docker +build.sh docker tag nibio/pc-geoslam-oracle-inst-seg:latest fra.ocir.io/axqlz2potslu/nibio/pc-geoslam-oracle-inst-seg docker push fra.ocir.io/axqlz2potslu/nibio/pc-geoslam-oracle-sem-seg \ No newline at end of file diff --git a/config/config.yaml b/config/config.yaml index 3e9b2e8..5e98cb8 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,6 +1,6 @@ general: - input_folder: 'local_input_folder' - output_folder: 'local_output_folder' + input_folder: '/home/datascience/local_input_folder' + output_folder: '/home/datascience/local_output_folder' clean_output_folder: false run_sematic_segmentation: true run_instance_segmentation: false diff --git a/d_run.sh b/d_run.sh index 1199955..1b61348 100644 --- a/d_run.sh +++ b/d_run.sh @@ -6,8 +6,8 @@ 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_oracle,target=/home/datascience/app/local_folder_oracle \ - --mount type=bind,source=/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_oracle_hard,target=/home/datascience/app/local_folder_oracle_hard \ + --mount type=bind,source=/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_oracle,target=/home/bucket/local_folder_oracle \ + --mount type=bind,source=/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_oracle_hard,target=/home/bucket/local_folder_oracle_hard \ nibio/pc-geoslam-oracle > test_oracle.log 2>&1 diff --git a/run_oracle_wrapper_local.py b/run_oracle_wrapper_local.py index f23d69b..4043a93 100644 --- a/run_oracle_wrapper_local.py +++ b/run_oracle_wrapper_local.py @@ -9,7 +9,7 @@ import yaml from run import main -DEBUG_MODE = True +DEBUG_MODE = False def run_oracle_wrapper(path_to_config_file): @@ -20,11 +20,11 @@ def run_oracle_wrapper(path_to_config_file): # read system environment variables if DEBUG_MODE: - input_location = "local_folder_oracle_hard/las_files/" - output_location = "local_folder_oracle_hard/results/" + input_location = "/home/bucket/local_folder_oracle_hard/las_files/" + output_location = "/home/bucket/local_folder_oracle_hard/results/" - # input_location = "local_folder_oracle/las_files/" - # output_location = "local_folder_oracle/results/" + # input_location = "/home/bucket/local_folder_oracle/las_files/" + # output_location = "/home/bucket/local_folder_oracle/results/" # remove content of the output folder if it exists if os.path.exists(output_location): -- GitLab