diff --git a/Dockerfile b/Dockerfile index b1139c1..5f30141 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,26 @@ -FROM mambaorg/micromamba:latest +FROM mambaorg/micromamba:latest AS mamba_pdal COPY environment.yml /environment.yml # Using USER root seems to fix permission issues when building mamba environment with pip packages USER root + +RUN apt update +RUN apt install -y git + RUN micromamba env create -n patchwork -f /environment.yml -WORKDIR /patchwork -COPY . /patchwork +# Start from raw debian image to lower the final image size +FROM debian:bullseye-slim + +# install PDAL + mamba environment +COPY --from=mamba_pdal /opt/conda/envs/patchwork/bin/pdal /opt/conda/envs/patchwork/bin/pdal +COPY --from=mamba_pdal /opt/conda/envs/patchwork/bin/python /opt/conda/envs/patchwork/bin/python +COPY --from=mamba_pdal /opt/conda/envs/patchwork/lib/ /opt/conda/envs/patchwork/lib/ +COPY --from=mamba_pdal /opt/conda/envs/patchwork/ssl /opt/conda/envs/patchwork/ssl +COPY --from=mamba_pdal /opt/conda/envs/patchwork/share/proj/proj.db /opt/conda/envs/patchwork/share/proj/proj.db ENV PATH=$PATH:/opt/conda/envs/patchwork/bin/ ENV PROJ_LIB=/opt/conda/envs/patchwork/share/proj/ + +WORKDIR /patchwork +COPY . /patchwork + diff --git a/examples/patchwork_example.sh b/examples/patchwork_example.sh new file mode 100644 index 0000000..8723762 --- /dev/null +++ b/examples/patchwork_example.sh @@ -0,0 +1,9 @@ +# for selecting, cutting and dispatching lidar files for patchwork +python main.py \ + filepath.RECIPIENT_DIRECTORY=[dossier parent du fichier receveur] \ + filepath.RECIPIENT_NAME=[nom du fichier receveur] \ + filepath.SHP_DIRECTORY=[dossier parent du shapefile] \ + filepath.SHP_NAME=[nom du fichier shapefile] \ + filepath.OUTPUT_DIR=[dossier de sortie] \ + filepath.OUTPUT_NAME=[nom du fichier de sortie] \ + \[autres options\] diff --git a/exemples/patchwork_example.sh b/exemples/patchwork_example.sh deleted file mode 100644 index 00fa870..0000000 --- a/exemples/patchwork_example.sh +++ /dev/null @@ -1,20 +0,0 @@ -# for selecting, cutting and dispatching lidar files for patchwork -python main.py \ - -filepath.DONOR_DIRECTORY=[donor_file_dir] -filepath.DONOR_NAME=[donor_file_name] -filepath.RECIPIENT_DIRECTORY=[recipient_file_dir] -filepath.RECIPIENT_NAME=[recipient_file_name] -filepath.OUTPUT_DIR=[output_file_dir] -filepath.OUTPUT_NAME=[output_file_name] -filepath.OUTPUT_INDICES_MAP_DIR=[output_indices_map_dir] -filepath.OUTPUT_INDICES_MAP_NAME=[output_indices_map_name] - -# filepath.DONOR_DIRECTORY: the directory to the lidar file we will add points from -# filepath.DONOR_NAME: the name of the lidar file we will add points from -# filepath.RECIPIENT_DIRECTORY: the directory to the lidar file we will add points to -# filepath.RECIPIENT_NAME: the name of the lidar file we will add points to -# filepath.OUTPUT_DIR: the directory to the resulting lidar file -# filepath.OUTPUT_NAME: the directory of the resulting lidar file -# filepath.OUTPUT_INDICES_MAP_DIR: the directory to the map with indices displaying where points have been added -# filepath.OUTPUT_INDICES_MAP_NAME: the name of the map with indices displaying where points have been added \ No newline at end of file