Dockerfile.dev 2.23 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
13
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/core/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 \
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
33
	expat-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

Steffen Vogel's avatar
Steffen Vogel committed
39
40
41
42
# Install some debuginfos
RUN dnf -y debuginfo-install \
	python3

43
ENV LD_LIBRARY_PATH /usr/local/lib64
44

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
45
ADD requirements.txt .
46
RUN pip3 install -r requirements.txt
47

48
# Remove this part in the future and use dedicated jupyter Dockerfile
Steffen Vogel's avatar
Steffen Vogel committed
49
# Activate Jupyter extensions
50
ADD requirements-jupyter.txt .
51
RUN pip3 install -r requirements-jupyter.txt
52
RUN dnf -y --refresh install npm
Steffen Vogel's avatar
Steffen Vogel committed
53
54
55
RUN jupyter nbextension enable --py widgetsnbextension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager

Markus Mirz's avatar
Markus Mirz committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# VILLAS dependencies
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libconfig-devel \
    libnl3-devel \
    libcurl-devel \
    jansson-devel \
    libwebsockets-devel \
    mosquitto-devel

# FEIN libraries
RUN cd /tmp && \
	git clone --recurse-submodules https://github.com/CIM-IEC/libcimpp.git && \
	mkdir -p libcimpp/build && cd libcimpp/build && \
71
	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
72
73
74
75
76
77
78
79
	rm -rf /tmp/libcimpp

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

80
EXPOSE 8888