Aufgrund einer Wartung wird GitLab am 25.01 zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 25.01 between 8:00 and 9:00 am.

Dockerfile.dev 3.33 KB
Newer Older
Steffen Vogel's avatar
Steffen Vogel committed
1
FROM fedora:29
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
2

Markus Mirz's avatar
Markus Mirz committed
3
4
ARG VILLAS_VERSION=0.8.0

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
5
6
7
8
9
10
11
12
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/" \
13
	org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
14

Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
15
16
RUN dnf -y update

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
17
# Toolchain
18
RUN dnf -y install \
19
	git clang gdb ccache \
Steffen Vogel's avatar
Steffen Vogel committed
20
	redhat-rpm-config \
21
	rpmdevtools \
22
	make cmake ninja-build \
Steffen Vogel's avatar
Steffen Vogel committed
23
	doxygen \
Steffen Vogel's avatar
Steffen Vogel committed
24
	graphviz \
Steffen Vogel's avatar
Steffen Vogel committed
25
	pandoc \
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
26
27
	python3-pip \
	pkg-config
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
28
29

# Dependencies
Steffen Vogel's avatar
Steffen Vogel committed
30
RUN dnf --refresh -y install \
31
	python3-devel \
32
	eigen3-devel \
Markus Mirz's avatar
Markus Mirz committed
33
	libxml2-devel \
Steffen Vogel's avatar
Steffen Vogel committed
34
	spdlog-devel \
35
	graphviz-devel \
36
	sundials-devel \
Jan Dinkelbach's avatar
Jan Dinkelbach committed
37
	gsl-devel
Georg Martin Reinke's avatar
Georg Martin Reinke committed
38

39
40
41
42
43
44
45
46
# 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 && \
    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}"

47
48
49
50
51
52
53
54
55
56
57
58
# 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
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 32 LOG=INFO

ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
59

Steffen Vogel's avatar
Steffen Vogel committed
60
61
62
63
# Install some debuginfos
RUN dnf -y debuginfo-install \
	python3

64
# CIMpp and VILLAS are installed here
65
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
66

Markus Mirz's avatar
Markus Mirz committed
67
68
69
70
71
72
73
74
75
76
77
# VILLAS dependencies
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libconfig-devel \
    libnl3-devel \
    libcurl-devel \
    jansson-devel \
    libwebsockets-devel \
    mosquitto-devel

78
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
79
80
81
RUN cd /tmp && \
	git clone --recurse-submodules https://github.com/CIM-IEC/libcimpp.git && \
	mkdir -p libcimpp/build && cd libcimpp/build && \
82
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=IEC61970_16v29a -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
Markus Mirz's avatar
Markus Mirz committed
83
84
	rm -rf /tmp/libcimpp

85
# Install VILLAS from source
Markus Mirz's avatar
Markus Mirz committed
86
87
88
89
90
91
RUN cd /tmp && \
	git clone --recurse-submodules 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 && \
	rm -rf /tmp/villasnode

92
93
94
95
96
97
98
99
100
101
102
103
# 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

104
EXPOSE 8888