Commit c1d9ddc6 authored by Niklas Eiling's avatar Niklas Eiling
Browse files

CI: add Dockerfile.dev-centos that builds dpsim on centos instead of fedora

this is currently necessary for remote gpu execution
parent ac358af3
......@@ -21,7 +21,7 @@ docker:
script:
- cp -r ~/.ssh .
- docker build
--file Packaging/Docker/Dockerfile.dev
--file Packaging/Docker/Dockerfile.dev-centos
--tag ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}:latest .
# build dedicated jupyter image in the future
......@@ -58,16 +58,16 @@ build:linux-cuda:
script:
- mkdir -p build
- cd build
- cmake ..
- cmake -DWITH_SPDLOG_SUBMODULE=ON ..
- make -j 32
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
cache:
paths:
- build
key: build-linux-cuda
# cache:
# paths:
# - build
# key: build-linux-cuda
artifacts:
paths:
- build
- build
tags:
- docker
......@@ -198,15 +198,37 @@ build:docker:
CI_DIR: '$CI_BUILDS_DIR/$CI_PROJECT_PATH'
LDIR: '/cricket/bin'
TEST_FILES: ''
TEST_PARAM: ''
REMOTE_LIBS: 'linux-vdso.so.1
librt.so.1
libdl.so.2
libcudart.so.10.2
libcusolver.so.10
libstdc\+\+.so.6
libm.so.6
libgcc_s.so.1
libc.so.6
/lib64/ld-linux-x86-64.so.2
libutil.so.1
libpthread.so.0'
script:
- ls $TEST_BINARY_PATH
- ldd $TEST_BINARY_PATH/$TEST_BINARY | sed -n -E -e 's/^\s+\S+ => (\S+) \S+$/\1/p' | xargs -I % cp % $LDIR
- echo "$TEST_BINARY_PATH/$TEST_BINARY $TEST_FILES" | tr -d '\n' | xargs -r -d " " -I % cp % $LDIR
- echo $REMOTE_LIBS
- ldd $LDIR/$TEST_BINARY |
sed -n -E -e 's/^\s+\S+ => (\S+) \S+$/\1/p' |
grep -Ev "$(echo $REMOTE_LIBS | tr ' ' '|')|not" |
xargs -I % cp % $LDIR/
#- ldd $TEST_BINARY_PATH/$TEST_BINARY |
# sed -n -E -e 's/^\s+(\S+) => \S+ \S+$/\1/p' |
# sed '/libc.so/d' | sed '/linux-vdso.so/d' |
# xargs -I % patchelf --remove-needed % $LDIR/$TEST_BINARY
- ssh $GPU_TARGET mkdir -p $RDIR
- scp -r $LDIR/* $GPU_TARGET:$RDIR/
- ssh $GPU_TARGET "LD_LIBRARY_PATH=$RDIR:$${LD_LIBRARY_PATH} LD_PRELOAD=$RDIR/cricket-server.so $RDIR/$TEST_BINARY" &
- echo "LD_LIBRARY_PATH=$RDIR:${LD_LIBRARY_PATH} LD_PRELOAD=$RDIR/cricket-server.so $RDIR/$TEST_BINARY"
- ssh $GPU_TARGET "LD_LIBRARY_PATH=$RDIR:${LD_LIBRARY_PATH} LD_PRELOAD=$RDIR/cricket-server.so $RDIR/$TEST_BINARY" &
- sleep 2
- PATH=$LDIR:$PATH LD_PRELOAD=$LDIR/libtirpc.so.3:$LDIR/cricket-client.so $LDIR/$TEST_BINARY
#- PATH=$LDIR:${PATH} cricket info $TEST_BINARY_PATH/$TEST_BINARY
- PATH=$LDIR:${PATH} LD_PRELOAD=$LDIR/libtirpc.so.3:$LDIR/cricket-client.so $TEST_BINARY_PATH/$TEST_BINARY $TEST_PARAM
after_script:
#- ssh $GPU_TARGET rm -rf $RDIR
- ssh $GPU_TARGET pkill -fe -2 $RDIR/test_kernel
......@@ -219,13 +241,14 @@ build:docker:
test:cuda:
extends: .remote-gpu
variables:
# Name of the test binary
TEST_BINARY: 'WSCC_9bus_mult_decoupled'
# Path where the test binary is located
TEST_BINARY_PATH: 'build/Examples/Cxx'
TEST_FILES: '/usr/local/lib64/libvillas.so.1
Examples/CIM/grid-data/WSCC-09/WSCC-09_RX/WSCC-09_RX_DI.xml
Examples/CIM/grid-data/WSCC-09/WSCC-09_RX/WSCC-09_RX_EQ.xml
Examples/CIM/grid-data/WSCC-09/WSCC-09_RX/WSCC-09_RX_SV.xml
Examples/CIM/grid-data/WSCC-09/WSCC-09_RX/WSCC-09_RX_TP.xml'
# Additional files that are necessary to run the application on the GPU node
TEST_FILE: ''
# Command line parameters for the test binary
TEST_PARAM: ''
# Stage deploy
##############################################################################
......
FROM centos:8
ARG VILLAS_VERSION=0.8.0
LABEL \
org.label-schema.schema-version = "1.0" \
org.label-schema.name = "DPsim" \
org.label-schema.license = "GPL-3.0" \
org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
org.label-schema.author.name = "Steffen Vogel" \
org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
org.label-schema.url = "http://fein-aachen.org/projects/dpsim/" \
org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
RUN dnf -y update && \
dnf install -y epel-release dnf-plugins-core && \
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm && \
dnf config-manager --set-enabled PowerTools && \
dnf config-manager --set-enabled remi
# Toolchain
RUN dnf -y install \
git clang gdb ccache \
redhat-rpm-config \
rpmdevtools \
make cmake ninja-build \
doxygen \
graphviz \
pandoc \
python3-pip \
pkg-config
# Dependencies
RUN dnf --refresh -y install \
python3-devel \
eigen3-devel \
libxml2-devel \
graphviz-devel \
gsl-devel
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-repo-rhel8-10.2.89-1.x86_64.rpm && \
dnf --refresh -y install cuda-compiler-10-2 cuda-libraries-dev-10-2 && \
ln -s cuda-10.2 /usr/local/cuda
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
# CUDARPC and dependencies
RUN dnf install -y make bash git gcc autoconf libtool automake
RUN dnf install -y ncurses-devel zlib-devel binutils-devel mesa-libGL-devel libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind rpcgen patchelf
ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}"
# copy gitlab-runner ssh credentials into build container
COPY --chown=root .ssh /root/.ssh
RUN git clone --recurse-submodules https://git.rwth-aachen.de/niklas.eiling/cricket.git && \
cd cricket && \
make -j 16 LOG=INFO
ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
# Install some debuginfos
RUN dnf -y debuginfo-install \
python3
# CIMpp and VILLAS are installed here
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
# VILLAS dependencies
RUN dnf -y install \
openssl-devel \
libuuid-devel \
libconfig-devel \
libnl3-devel \
libcurl-devel \
jansson-devel \
libwebsockets-devel \
mosquitto-devel
# Install CIMpp
RUN cd /tmp && \
git clone --recurse-submodules 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
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt
# Remove this part in the future and use dedicated jupyter Dockerfile
# Activate Jupyter extensions
ADD requirements-jupyter.txt .
RUN pip3 install -r requirements-jupyter.txt
RUN dnf -y --refresh install npm
RUN jupyter nbextension enable --py widgetsnbextension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
EXPOSE 8888
......@@ -151,4 +151,4 @@ endif()
target_link_libraries(cps PUBLIC ${CPS_LIBRARIES})
target_include_directories(cps PUBLIC ${CPS_INCLUDE_DIRS})
target_sources(cps PRIVATE ${CPS_SOURCES})
target_compile_options(cps PUBLIC ${CPS_CXX_FLAGS})
\ No newline at end of file
target_compile_options(cps PUBLIC ${CPS_CXX_FLAGS})
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