Skip to content

Commit

Permalink
add DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
alavenant committed Dec 19, 2023
1 parent 8d16c1e commit 547fb0c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM mambaorg/micromamba:latest as build_ign_pdal_plugin
COPY environment.yml /environment.yml

USER root
RUN micromamba env create -f /environment.yml
SHELL ["micromamba", "run", "-n", "pdal_ign_plugin", "/bin/bash", "-c"]

COPY . .

RUN apt-get update && apt-get install -y cmake make build-essential g++ && rm -rf /var/lib/apt/lists/*

RUN cmake -G"Unix Makefiles" -DCONDA_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release
RUN make -j4 install

FROM debian:bullseye-slim

# install the plugIn
COPY --from=build_ign_pdal_plugin tmp/install/lib/* lib

# install PDAL
COPY --from=build_ign_pdal_plugin /opt/conda/envs/pdal_ign_plugin/bin/pdal /opt/conda/envs/pdal_ign_plugin/bin/pdal
COPY --from=build_ign_pdal_plugin /opt/conda/envs/pdal_ign_plugin/bin/python /opt/conda/envs/pdal_ign_plugin/bin/python
COPY --from=build_ign_pdal_plugin /opt/conda/envs/pdal_ign_plugin/lib/ /opt/conda/envs/pdal_ign_plugin/lib/
COPY --from=build_ign_pdal_plugin /opt/conda/envs/pdal_ign_plugin/ssl /opt/conda/envs/pdal_ign_plugin/ssl
COPY --from=build_ign_pdal_plugin /opt/conda/envs/pdal_ign_plugin/share/proj/proj.db /opt/conda/envs/pdal_ign_plugin/share/proj/proj.db

ENV PATH=$PATH:/opt/conda/envs/pdal_ign_plugin/bin/
ENV PROJ_LIB=/opt/conda/envs/pdal_ign_plugin/share/proj/
ENV PDAL_DRIVER_PATH=/lib/
2 changes: 1 addition & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export CONDA_PREFIX=$CONDA_PREFIX
mkdir build
cd build
cmake -G"Unix Makefiles" -DCONDA_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release ../
make $1 install
make install

conda deactivate

Expand Down

0 comments on commit 547fb0c

Please sign in to comment.