Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM debian:bullseye as dependencies

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / release / build (linux/amd64)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG PYTHON_VERSION=3.11.2

# Disable GUI prompts
ENV DEBIAN_FRONTEND noninteractive

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / release / build (linux/amd64)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/


RUN rm /var/lib/dpkg/info/libc-bin.*
Expand Down Expand Up @@ -34,11 +34,21 @@
tar -xzf make-4.4.1.tar.gz && \
cd make-4.4.1 && \
./configure --prefix=/usr/local && \
make && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf make-4.4.1 make-4.4.1.tar.gz

# Install CMake 4.0.3
RUN wget https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3.tar.gz && \
tar -xzf cmake-4.0.3.tar.gz && \
cd cmake-4.0.3 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf cmake-4.0.3 cmake-4.0.3.tar.gz

# Set working directory
WORKDIR /usr/src

Expand All @@ -59,7 +69,7 @@
RUN python3 -m pip install --upgrade pip

# Use git to clone gtsam and specific GTSAM version
FROM alpine/git:2.47.2 as gtsam-clone
FROM alpine/git:2.49.0 as gtsam-clone

Check warning on line 72 in Dockerfile

View workflow job for this annotation

GitHub Actions / release / build (linux/amd64)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ARG GTSAM_VERSION=4.2.0
WORKDIR /usr/src/
Expand All @@ -71,7 +81,7 @@
git checkout ${GTSAM_VERSION}

# Create new stage called gtsam for GTSAM building
FROM dependencies as gtsam

Check warning on line 84 in Dockerfile

View workflow job for this annotation

GitHub Actions / release / build (linux/amd64)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# Move gtsam data
COPY --from=gtsam-clone /usr/src/gtsam /usr/src/gtsam
Expand All @@ -94,10 +104,11 @@
-DGTSAM_BUILD_PYTHON=ON \
-DGTSAM_BUILD_CONVENIENCE_LIBRARIES=OFF \
-DGTSAM_PYTHON_VERSION=${PYTHON_VERSION} \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
..

# Make install and clean up
RUN make -j4 install && \
RUN make -j$(nproc) install && \
make python-install && \
make clean

Expand Down
Loading