Skip to content

Commit

Permalink
ci for focal
Browse files Browse the repository at this point in the history
  • Loading branch information
koide3 committed Jul 10, 2024
1 parent c734fc6 commit 9c07e23
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
strategy:
matrix:
DISTRO: [
{ "ubuntu": "noble", "suffix": "gcc" },
{ "ubuntu": "noble", "suffix": "llvm" },
{ "ubuntu": "jammy", "suffix": "gcc" },
{ "ubuntu": "jammy", "suffix": "llvm" },
{ "ubuntu": "jammy_cuda12.2", "suffix": "gcc.cuda" },
{ "ubuntu": "jammy_cuda12.2", "suffix": "llvm.cuda" },
{ "ubuntu": "noble", "suffix": "gcc" },
{ "ubuntu": "noble", "suffix": "llvm" }
{ "ubuntu": "focal", "suffix": "focal" },
{ "ubuntu": "focal_cuda12.2", "suffix": "focal.cuda" },
]

steps:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ find_package(GTSAM REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Eigen3 REQUIRED)

if(${BUILD_WITH_CUDA} AND ${EIGEN3_VERSION_STRING} VERSION_LESS "3.3.90")
if(${BUILD_WITH_CUDA} AND ${EIGEN3_VERSION_STRING} AND ${EIGEN3_VERSION_STRING} VERSION_LESS "3.3.90")
message(WARNING "Detected Eigen ${EIGEN3_VERSION_STRING} is not compatible with CUDA")
message(WARNING "Use Eigen 3.3.90 or later (3.4.0 is recommended)")
endif()
Expand Down
28 changes: 28 additions & 0 deletions docker/ubuntu/Dockerfile.focal
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG BASE_IMAGE=koide3/gtsam_docker:focal

FROM ${BASE_IMAGE}

RUN test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

COPY . /root/gtsam_points
WORKDIR /root/gtsam_points/build
RUN rm -rf *
RUN cmake .. \
-DBUILD_DEMO=ON \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLE=ON \
-DBUILD_WITH_CUDA=OFF \
-DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make test && \
make install && \
rm -rf /root/gtsam_points/build

CMD ["bash"]
36 changes: 36 additions & 0 deletions docker/ubuntu/Dockerfile.focal.cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ARG BASE_IMAGE=koide3/gtsam_docker:focal_cuda12.2

FROM ${BASE_IMAGE}

RUN test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

# System eigen on focal is too old.
# Install Eigen that is newer but compatible with 3.3.7 used by GTSAM.
RUN git clone https://gitlab.com/libeigen/eigen.git
WORKDIR /root/eigen
RUN git checkout 1fd5ce1
WORKDIR /root/eigen/build
RUN cmake .. && make install

COPY . /root/gtsam_points
WORKDIR /root/gtsam_points/build
RUN rm -rf *
RUN cmake .. \
-DBUILD_DEMO=ON \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLE=ON \
-DBUILD_WITH_CUDA=ON \
-DBUILD_WITH_CUDA_MULTIARCH=ON \
-DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install && \
rm -rf /root/gtsam_points/build

CMD ["bash"]
2 changes: 1 addition & 1 deletion docker/ubuntu/Dockerfile.gcc.cuda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=koide3/gtsam_docker:jammy
ARG BASE_IMAGE=koide3/gtsam_docker:jammy_cuda12.2

FROM ${BASE_IMAGE}

Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/Dockerfile.llvm.cuda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=koide3/gtsam_docker:jammy
ARG BASE_IMAGE=koide3/gtsam_docker:jammy_cuda12.2

FROM ${BASE_IMAGE}

Expand Down
1 change: 1 addition & 0 deletions include/gtsam_points/ann/small_kdtree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*************************************************************************/
#pragma once

#include <atomic>
#include <memory>
#include <numeric>
#include <Eigen/Core>
Expand Down

0 comments on commit 9c07e23

Please sign in to comment.