1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Merge branch 'fix-dockerfile' into 'master'

migrate dockerfile to rocky9

See merge request acs/public/villas/fpga/fpga!20
This commit is contained in:
Steffen Vogel 2022-11-17 14:47:24 +01:00
commit 57fbcb836e
2 changed files with 29 additions and 23 deletions

View file

@ -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/*'

View file

@ -28,7 +28,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###################################################################################
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