Commit d2c302fc authored by Markus Mirz's avatar Markus Mirz
Browse files

docker and cmake: update to fedora 32

parent ef47ba38
......@@ -40,19 +40,19 @@ docker:centos:
- shell
- linux
docker:jupyter:
stage: prepare
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile.jupyter
--build-arg DOCKER_IMAGE=${DOCKER_IMAGE_DEV}
--build-arg DOCKER_TAG=${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}-jupyter:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}-jupyter:latest .
tags:
- shell
- linux
#docker:jupyter:
# stage: prepare
# needs: []
# script:
# - docker build
# --file Packaging/Docker/Dockerfile.jupyter
# --build-arg DOCKER_IMAGE=${DOCKER_IMAGE_DEV}
# --build-arg DOCKER_TAG=${DOCKER_TAG}
# --tag ${DOCKER_IMAGE_DEV}-jupyter:${DOCKER_TAG}
# --tag ${DOCKER_IMAGE_DEV}-jupyter:latest .
# tags:
# - shell
# - linux
build:linux:
stage: build
......
......@@ -76,6 +76,8 @@ if (WITH_SPDLOG_SUBMODULE OR WIN32)
set(SPDLOG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/spdlog/include)
else()
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
add_compile_definitions(SPDLOG_FMT_EXTERNAL)
endif()
find_package(Threads REQUIRED)
......@@ -148,9 +150,6 @@ if(WITH_CUDA)
# END OF WORKAROUND
endif()
option(BUILD_SHARED_LIBS "Build shared library" OFF)
option(BUILD_EXAMPLES "Build C++ examples" ON)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Include/dpsim/Config.h.in
${CMAKE_CURRENT_BINARY_DIR}/Include/dpsim/Config.h
......
FROM fedora:29
FROM fedora:32
ARG VILLAS_VERSION=0.8.0
......@@ -16,25 +16,50 @@ RUN dnf -y update
# Toolchain
RUN dnf -y install \
git clang gdb ccache \
redhat-rpm-config \
rpmdevtools \
make cmake ninja-build \
doxygen \
graphviz \
pandoc \
python3-pip \
pkg-config
gcc gcc-c++ clang \
git \
rpmdevtools rpm-build \
make cmake pkgconfig \
python3-pip
# Tools needed for developement
RUN dnf -y install \
doxygen graphviz \
gdb
# Dependencies
RUN dnf --refresh -y install \
python3-devel \
eigen3-devel \
libxml2-devel \
spdlog-devel \
graphviz-devel \
sundials-devel \
gsl-devel
gsl-devel \
spdlog-devel \
fmt-devel
## Build & Install fmtlib
#RUN cd /tmp && \
# git clone --recursive https://github.com/fmtlib/fmt.git && \
# mkdir -p fmt/build && cd fmt/build && \
# git checkout 6.1.2 && \
# cmake -DBUILD_SHARED_LIBS=ON .. && \
# make -j$(nproc) install
## Build & Install spdlog
#RUN cd /tmp && \
# git clone --recursive https://github.com/gabime/spdlog.git && \
# mkdir -p spdlog/build && cd spdlog/build && \
# git checkout v1.5.0 && \
# cmake -DSPDLOG_BUILD_SHARED=ON .. && \
# make -j$(nproc) install
# Build & Install sundials
RUN cd /tmp && \
git clone --recursive https://github.com/LLNL/sundials.git && \
mkdir -p sundials/build && cd sundials/build && \
git checkout v3.2.1 && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) install
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/fedora29/x86_64/cuda-repo-fedora29-10.2.89-1.x86_64.rpm && \
......@@ -51,29 +76,32 @@ RUN dnf -y debuginfo-install \
# CIMpp and VILLAS are installed here
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
# VILLAS dependencies
# minimal VILLAS dependencies
RUN dnf -y install \
openssl-devel \
libuuid-devel \
libconfig-devel \
libnl3-devel \
libcurl-devel \
jansson-devel \
libwebsockets-devel \
mosquitto-devel
libwebsockets-devel
# optional VILLAS dependencies
RUN dnf -y install \
mosquitto-devel \
libconfig-devel \
libnl3-devel
# Install CIMpp from source
RUN cd /tmp && \
git clone --recurse-submodules https://github.com/CIM-IEC/libcimpp.git && \
git clone --recursive https://github.com/CIM-IEC/libcimpp.git && \
mkdir -p libcimpp/build && cd libcimpp/build && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=IEC61970_16v29a -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
rm -rf /tmp/libcimpp
# Install VILLAS from source
RUN cd /tmp && \
git clone --recurse-submodules https://git.rwth-aachen.de/acs/public/villas/node.git villasnode && \
git -c submodule.fpga.update=none clone --recursive https://git.rwth-aachen.de/acs/public/villas/node.git villasnode && \
mkdir -p villasnode/build && cd villasnode/build && \
cmake -DWITH_NODE_ETHERCAT=OFF -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
rm -rf /tmp/villasnode
# Python dependencies
......
......@@ -14,6 +14,10 @@ set(CPS_LIBRARIES
Threads::Threads
)
if (NOT (WITH_SPDLOG_SUBMODULE OR WIN32))
list(APPEND CPS_LIBRARIES fmt)
endif()
if(Linux_FOUND OR MacOS_FOUND)
# TODO This doesn't actually depend on which OS or compiler is used, but which
# stdlib. For now, under Linux only GNU's libstdc++ seems to work anyway.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment