Skip to content
Open
Show file tree
Hide file tree
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
36 changes: 27 additions & 9 deletions buildenv/archer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ RUN true \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

ENV CLANGVERSION 13
ENV CLANGVERSION=16

# add llvm repository
RUN echo "deb http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n\
deb-src http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main" > /etc/apt/sources.list.d/llvm.list
# Add llvm repository (can be used to get newer versions of clang)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Add llvm repository (can be used to get newer versions of clang)
# If needed in future: add llvm repository (can be used to get newer versions of clang)

# RUN echo "deb http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n\
# deb-src http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main" > /etc/apt/sources.list.d/llvm.list

# add llvm repo key
RUN wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
# RUN wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

# install clang llvm and python3-dev
RUN true \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
clang-${CLANGVERSION} \
lldb-${CLANGVERSION} \
libclang-rt-${CLANGVERSION}-dev \
unzip \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -31,7 +32,7 @@ RUN ln -s /usr/bin/clang++-${CLANGVERSION} /usr/bin/clang++
RUN ln -s /usr/bin/llvm-config-${CLANGVERSION} /usr/bin/llvm-config

# build everything in /ArcherBuild
ENV ARCHER_BUILD /ArcherBuild
ENV ARCHER_BUILD=/ArcherBuild
RUN mkdir $ARCHER_BUILD
WORKDIR $ARCHER_BUILD

Expand All @@ -40,17 +41,34 @@ RUN git config --global http.sslVerify false

#get, build and install openmp runtime
RUN git clone https://github.com/llvm/llvm-project --depth 1 -b release/${CLANGVERSION}.x llvm
WORKDIR llvm/openmp

ENV OPENMP_INSTALL /usr
ENV OPENMP_INSTALL=/usr/local

# Need to install llvm-config first
WORKDIR llvm
RUN mkdir build
WORKDIR build
RUN cmake -G Ninja \
-D LLVM_ENABLE_PROJECTS="" \
-D LLVM_TARGETS_TO_BUILD="X86" \
-D LLVM_INCLUDE_TESTS=OFF \
-D LLVM_INCLUDE_BENCHMARKS=OFF \
-D LLVM_INCLUDE_EXAMPLES=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=${OPENMP_INSTALL} \
../llvm
RUN ninja llvm-config
RUN ninja install

# Then install llvm openmp runtime which includes archer
WORKDIR ../openmp
RUN mkdir build
WORKDIR build
RUN cmake -G Ninja \
-D CMAKE_C_COMPILER=clang \
-D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX:PATH=${OPENMP_INSTALL} \
-D CMAKE_INSTALL_PREFIX=${OPENMP_INSTALL} \
-D LIBOMP_OMPT_SUPPORT=ON \
..
RUN ninja
Expand Down
53 changes: 15 additions & 38 deletions buildenv/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ENV UBUNTUVERSION="focal" \
ENV UBUNTUVERSION="noble" \
DEBIAN_FRONTEND="noninteractive"

# install base requirements + stuff that makes debugging easier
Expand All @@ -10,6 +10,7 @@ RUN true \
build-essential \
ca-certificates \
ccache \
cmake \
gdb \
git \
gnupg \
Expand All @@ -22,45 +23,21 @@ RUN true \
# install AutoPas dependencies so we don't rely on bundled versions
libeigen3-dev \
libyaml-cpp-dev \
# libspdlog-dev \ <- version too old. Needs at least 1.3.1
# needed for bundled antlr4 (rule based tuning parser engine)
libspdlog-dev \
# needed for bundled antlr4 (rule based tuning parser engine)
uuid-dev \
&& rm -rf /var/lib/apt/lists/*

# we might want to fix the certificate stuff
RUN wget \
--no-verbose \
-O cmakeInstallScript.sh \
https://github.com/Kitware/CMake/releases/download/v3.21.0-rc3/cmake-3.21.0-rc3-linux-x86_64.sh \
--no-check-certificate \
&& bash cmakeInstallScript.sh \
--skip-license \
--prefix=/usr \
&& rm cmakeInstallScript.sh

# if we ever need to switch to manual install
# RUN apt-get -qq install -y cmake \
# && wget --no-verbose https://github.com/Kitware/CMake/releases/download/v3.15.0-rc3/cmake-3.15.0-rc3.tar.gz \
# && tar -xzf cmake-3.15.0-rc3.tar.gz \
# && cd $_ \
# && mkdir build \
# && cd build \
# && cmake .. \
# && make -j4 \
# && make install

# install spdlog from source bc repo version is too old
RUN wget --no-verbose -O spdlog.tgz https://github.com/gabime/spdlog/archive/v1.4.2.tar.gz --no-check-certificate \
&& tar -xzf spdlog.tgz \
&& rm spdlog.tgz \
&& cd spdlog-* \
&& mkdir build \
&& cd build \
&& cmake .. \
-DCMAKE_BUILD_TYPE=RELEASE \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_BUILD_TESTS=OFF \
&& make install -j4
# If we need a newer version of cmake
# RUN wget \
# --no-verbose \
# -O cmakeInstallScript.sh \
# https://github.com/Kitware/CMake/releases/download/v3.21.0-rc3/cmake-3.21.0-rc3-linux-x86_64.sh \
# --no-check-certificate \
# && bash cmakeInstallScript.sh \
# --skip-license \
# --prefix=/usr \
# && rm cmakeInstallScript.sh

COPY bin/entrypoint.sh /usr/local/bin
RUN ln -s /usr/local/bin/entrypoint.sh / # backwards compat
Expand Down
28 changes: 18 additions & 10 deletions buildenv/clang/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
FROM autopas/build-base

ENV CLANGVERSION 13
ENV CLANGVERSION=16

# add llvm repository
RUN echo "deb http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n\
deb-src http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n" >> /etc/apt/sources.list.d/llvm.list
# Add llvm repository (can be used to get newer clang versions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Add llvm repository (can be used to get newer clang versions)
# If needed in future: add llvm repository (can be used to get newer clang versions)

# RUN echo "deb http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n\
# deb-src http://apt.llvm.org/${UBUNTUVERSION}/ llvm-toolchain-${UBUNTUVERSION}-${CLANGVERSION} main\n" >> /etc/apt/sources.list.d/llvm.list

# add llvm repo key
RUN wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
# RUN wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -

# install stuff
# openmpi 4.0.3 still has a memory leak, hence install mpich
RUN true \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
clang-${CLANGVERSION} \
lldb-${CLANGVERSION} \
libmpich-dev \
libclang-rt-${CLANGVERSION}-dev \
libomp-${CLANGVERSION}-dev \
clang-format-${CLANGVERSION} \
python3-pip \
python3-setuptools \
cmake-format \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade cmake-format

# openmpi has memory leaks and mpich from apt has bugs
# install mpich from source
WORKDIR /tmp
RUN wget https://www.mpich.org/static/downloads/4.3.2rc2/mpich-4.3.2rc2.tar.gz && \
tar -zxvf mpich-4.3.2rc2.tar.gz && \
cd mpich-4.3.2rc2 && \
./configure --prefix=/usr --disable-fortran && \
make && \
make install && \
ldconfig

# generate version agnostic links to clang
RUN ln -s /usr/bin/clang-${CLANGVERSION} /usr/bin/clang
Expand Down
29 changes: 19 additions & 10 deletions buildenv/gcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
FROM autopas/build-base

ENV GCCVERSION="11"
ENV GCCVERSION="13"

# install stuff
# openmpi 4.0.3 still has a memory leak, hence install mpich
# add ppa for newer gcc, install gcc-11, and set links to make it default
# install gcc-13, and set links to make it default
RUN true \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
libmpich-dev \
autoconf \
automake \
g++-${GCCVERSION} \
libtool \
software-properties-common \
python3-dev \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
g++-${GCCVERSION} \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s -f /usr/bin/gcc-${GCCVERSION} /usr/bin/gcc \
&& ln -s -f /usr/bin/g++-${GCCVERSION} /usr/bin/g++

# install lcov and set gcov-11
# openmpi has memory leaks and mpich from apt has bugs
# install mpich from source
WORKDIR /tmp
RUN wget https://www.mpich.org/static/downloads/4.3.2rc2/mpich-4.3.2rc2.tar.gz && \
tar -zxvf mpich-4.3.2rc2.tar.gz && \
cd mpich-4.3.2rc2 && \
./configure --prefix=/usr --disable-fortran && \
make && \
make install && \
ldconfig

# install lcov and set gcov-13
RUN cd \
&& perl -MCPAN -e 'install(Capture::Tiny, DateTime, Date::Parse, Cpanel::JSON::XS)' \
&& git clone https://github.com/linux-test-project/lcov.git \
&& cd lcov \
&& make install \
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 60 \
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 60 \
&& cd

CMD ["sh", "-c", "cmake -GNinja ../.. && ninja && ninja test"]
31 changes: 1 addition & 30 deletions buildenv/intel-one-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,9 @@ RUN true \
# install AutoPas dependencies so we don't rely on bundled versions
libeigen3-dev \
libyaml-cpp-dev \
# libspdlog-dev \ <- version too old. Needs at least 1.3.1
libspdlog-dev \
&& rm -rf /var/lib/apt/lists/*

# we might want to fix the certificate stuff
RUN wget -O cmakeInstallScript.sh https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh --no-check-certificate \
&& chmod +x cmakeInstallScript.sh \
&& ./cmakeInstallScript.sh --skip-license --prefix=/usr/local/ \
&& rm cmakeInstallScript.sh

# if we ever need to switch to manual install
# RUN apt-get -qq install -y cmake \
# && wget https://github.com/Kitware/CMake/releases/download/v3.15.0-rc3/cmake-3.15.0-rc3.tar.gz \
# && tar -xzf cmake-3.15.0-rc3.tar.gz \
# && cd $_ \
# && mkdir build \
# && cd build \
# && cmake .. \
# && make -j4 \
# && make install

# install spdlog from source bc repo version is too old
RUN wget -O spdlog.tgz https://github.com/gabime/spdlog/archive/v1.4.2.tar.gz --no-check-certificate \
&& tar -xzf spdlog.tgz \
&& cd spdlog-* \
&& mkdir build \
&& cd build \
&& cmake .. \
-DCMAKE_BUILD_TYPE=RELEASE \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_BUILD_TESTS=OFF \
&& make install -j4

COPY bin/entrypoint.sh /usr/local/bin
RUN ln -s /usr/local/bin/entrypoint.sh / # backwards compat
RUN mkdir -p /ccache_default_dir
Expand Down