From 791ece434b31b8b6592fbe127d7a8accccc4c791 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Thu, 17 Nov 2022 14:29:48 +0100 Subject: [PATCH] migrate dockerfile to rocky9 --- fpga/.gitlab-ci.yml | 5 ++--- fpga/Dockerfile | 47 ++++++++++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/fpga/.gitlab-ci.yml b/fpga/.gitlab-ci.yml index bc3aa8b17..e7a130430 100644 --- a/fpga/.gitlab-ci.yml +++ b/fpga/.gitlab-ci.yml @@ -42,12 +42,11 @@ build:source: test:unit: stage: test tags: - - villas-fpga - - cuda + - docker allow_failure: true script: | rm -r build && mkdir build && cd build - cmake3 .. + cmake .. make -j$(nproc) unit-tests if [ "$(who | wc -l)" -eq "0" ]; then tests/fpga-unit-tests --jobs 1 --filter 'fpga/*' diff --git a/fpga/Dockerfile b/fpga/Dockerfile index a9409826c..e7e08ae42 100644 --- a/fpga/Dockerfile +++ b/fpga/Dockerfile @@ -28,7 +28,7 @@ # along with this program. If not, see . ################################################################################### -FROM nvidia/cuda:9.2-devel-centos7 +FROM rockylinux:9 LABEL \ org.label-schema.schema-version="1.0" \ @@ -43,22 +43,26 @@ LABEL \ org.label-schema.usage="https://villas.fein-aachen.org/doc/fpga.html" # Enable Extra Packages for Enterprise Linux (EPEL) and Software collection repo -RUN yum -y install epel-release centos-release-scl +RUN dnf -y update && \ + dnf install -y epel-release dnf-plugins-core && \ + dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \ + dnf config-manager --set-enabled crb && \ + dnf config-manager --set-enabled remi # Toolchain -RUN yum -y install \ - devtoolset-7-toolchain \ - pkgconfig make cmake3 \ - autoconf automake autogen libtool \ - cppcheck \ - texinfo git curl tar - -# Several tools only needed for developement and testing -RUN yum -y install \ - rpmdevtools rpm-build +RUN dnf -y install \ + git clang gdb ccache \ + redhat-rpm-config \ + rpmdevtools rpm-build\ + make cmake ninja-build \ + wget \ + pkgconfig \ + autoconf automake libtool \ + cppcheck \ + git curl tar # Dependencies -RUN yum -y install \ +RUN dnf -y install \ jansson-devel \ openssl-devel \ curl-devel \ @@ -68,16 +72,19 @@ RUN yum -y install \ # Build & Install Fmtlib RUN git clone --recursive https://github.com/fmtlib/fmt.git /tmp/fmt && \ mkdir -p /tmp/fmt/build && cd /tmp/fmt/build && \ - git checkout 5.3.0 && \ - cmake3 -DBUILD_SHARED_LIBS=1 .. && \ + git checkout 6.1.2 && \ + cmake3 -DBUILD_SHARED_LIBS=1 -DFMT_TEST=OFF .. && \ make -j$(nproc) install && \ rm -rf /tmp/fmt # Build & Install spdlog RUN git clone --recursive https://github.com/gabime/spdlog.git /tmp/spdlog && \ mkdir -p /tmp/spdlog/build && cd /tmp/spdlog/build && \ - git checkout v1.6.0 && \ - cmake3 -DSPDLOG_FMT_EXTERNAL=ON -DSPDLOG_BUILD_BENCH=OFF .. && \ + git checkout v1.8.2 && \ + cmake -DSPDLOG_FMT_EXTERNAL=ON \ + -DSPDLOG_BUILD_BENCH=OFF \ + -DSPDLOG_BUILD_SHARED=ON \ + -DSPDLOG_BUILD_TESTS=OFF .. && \ make -j$(nproc) install && \ rm -rf /tmp/spdlog @@ -85,18 +92,18 @@ RUN git clone --recursive https://github.com/gabime/spdlog.git /tmp/spdlog && \ RUN git clone --recursive https://github.com/Snaipe/Criterion /tmp/criterion && \ mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && \ git checkout v2.3.3 && \ - cmake3 .. && \ + cmake .. && \ make -j$(nproc) install && \ rm -rf /tmp/* # Build & Install libxil RUN git clone https://git.rwth-aachen.de/acs/public/villas/fpga/libxil.git /tmp/libxil && \ mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && \ - cmake3 .. && \ + cmake .. && \ make -j$(nproc) install && \ rm -rf /tmp/* ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64 WORKDIR /fpga -ENTRYPOINT scl enable devtoolset-7 bash +