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

update for /home/datasciencefolder mapping in the oracle cloud

parent 48e3b042
No related branches found
No related tags found
No related merge requests found
......@@ -37,14 +37,17 @@ RUN pip install parse oci ocifs
COPY requirements.txt app/requirements.txt
RUN pip install --no-cache -r app/requirements.txt
COPY . /app
# COPY . /app
# WORKDIR /app
WORKDIR /app
COPY . /home/datascience/app
WORKDIR /home/datascience/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"]
Dockerfile - set correct oracle wrapper
# 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
\ No newline at end of file
config.yaml -> pick segmentation or instance segmentation
# pushing docker
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
......@@ -6,8 +6,9 @@ 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=/app/local_folder_oracle \
nibio/pc-geoslam-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 \
nibio/pc-geoslam-oracle > test_oracle.log 2>&1
import sys
def remove_prefix(lines):
processed_lines = [line.split(' - ', 1)[1] if ' - ' in line else line for line in lines]
return processed_lines
def process_file(input_filename, output_filename):
with open(input_filename, 'r') as input_file:
data = input_file.read()
lines = data.split('\n')
processed_lines = remove_prefix(lines)
processed_data = '\n'.join(processed_lines)
with open(output_filename, 'w') as output_file:
output_file.write(processed_data)
if __name__ == '__main__':
if len(sys.argv) < 3:
print("Please provide both input and output filenames as command-line arguments.")
else:
input_filename = sys.argv[1]
output_filename = sys.argv[2]
process_file(input_filename, output_filename)
print(f"Processed data saved to {output_filename}.")
......@@ -20,8 +20,12 @@ def run_oracle_wrapper(path_to_config_file):
# read system environment variables
if DEBUG_MODE:
input_location = "local_folder_oracle/las_files/"
output_location = "local_folder_oracle/results/"
input_location = "local_folder_oracle_hard/las_files/"
output_location = "local_folder_oracle_hard/results/"
# 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment