Skip to content

Commit

Permalink
update DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
alavenant committed Dec 20, 2023
1 parent 7958068 commit f2b061e
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
FROM mambaorg/micromamba:latest as build_ign_pdal_plugin
COPY environment_docker.yml /environment_docker.yml

USER root
RUN micromamba env create -f /environment_docker.yml
FROM mambaorg/micromamba:bullseye-slim as build

COPY environment.yml /environment_docker.yml

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

COPY . .

RUN apt-get update && apt-get install --no-install-recommends -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

COPY src src
COPY CMakeLists.txt CMakeLists.txt

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

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=/tmp/install/lib

FROM debian:bullseye-slim

COPY --from=build /opt/conda/envs/pdal_ign_plugin /opt/conda/envs/pdal_ign_plugin
COPY --from=build /tmp/install/lib /tmp/install/lib

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=/tmp/install/lib

0 comments on commit f2b061e

Please sign in to comment.