small_gicp/docker/Dockerfile.test.llvm

41 lines
1.1 KiB
Docker

ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y \
&& apt-get install --no-install-recommends -y \
wget nano build-essential git cmake python3-pip pybind11-dev \
libeigen3-dev libfmt-dev libtbb-dev libomp-dev libpcl-dev libgtest-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install --no-install-recommends -y \
&& apt-get install --no-install-recommends -y \
clang lld \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install -U setuptools pytest numpy scipy
RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50
ENV CC=clang
ENV CXX=clang++
COPY . /root/small_gicp
WORKDIR /root/small_gicp/build
RUN rm -rf ./*
RUN cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON -DBUILD_WITH_TBB=ON -DBUILD_WITH_PCL=ON
RUN cmake --build . -j$(nproc)
RUN ctest -j$(nproc)
WORKDIR /root/small_gicp
RUN pip install .
RUN pytest src/example/basic_registration.py
RUN pytest src/test/python_test.py
WORKDIR /
CMD ["bash"]