-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.ekf_private
82 lines (66 loc) · 2.74 KB
/
Dockerfile.ekf_private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND="noninteractive"
ENV TZ="America/Pacific"
# ----------------------------------------------------
# INSTALL HELICS
# ----------------------------------------------------
RUN apt update \
&& apt upgrade -y \
&& apt install -y cmake libboost-dev libzmq5-dev git build-essential autoconf automake libtool m4 wget libaprutil1-dev liblapack-dev libblas-dev libssl-dev software-properties-common
RUN mkdir /build \
&& cd /build \
&& git clone https://github.com/GMLC-TDC/HELICS \
&& cd HELICS \
&& mkdir build \
&& cd build \
&& cmake -DHELICS_BUILD_CXX_SHARED_LIB=True -DCMAKE_CXX_STANDARD=20 ../ \
&& cmake . \
&& make \
&& make install
RUN cd /build \
&& wget http://archive.apache.org/dist/activemq/activemq-cpp/3.9.5/activemq-cpp-library-3.9.5-src.tar.gz \
&& tar -xzf activemq-cpp-library-3.9.5-src.tar.gz \
&& cd activemq-cpp-library-3.9.5 \
&& ./configure \
&& make \
&& make install
# ----------------------------------------------------
# INSTALL State Estimator
# ----------------------------------------------------
RUN cd /build \
&& git clone --depth 1 --branch updating_oedisi_interface https://github.com/Tylores/gridappsd-state-estimator \
&& cd gridappsd-state-estimator \
&& git clone https://github.com/GRIDAPPSD/SuiteSparse \
&& git clone https://github.com/GRIDAPPSD/json
RUN cd /build/gridappsd-state-estimator \
&& LD_LIBRARY_PATH=/build/gridappsd-state-estimator/SuiteSparse/lib/ \
&& make -C SuiteSparse LAPACK=-llapack BLAS=-lblas
RUN cd /build/gridappsd-state-estimator \
&& make -C state-estimator \
&& rm -rf .git SuiteSparse/.git json/.git
# ----------------------------------------------------
# INSTALL Python requirements
# ----------------------------------------------------
RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt update \
&& apt install -y python3.12 python3.12-dev python3.12-venv python3-pip
ENV VIRTUAL_ENV=/opt/venv
RUN python3.12 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY requirements.txt /home/requirements.txt
RUN pip install -r /home/requirements.txt
ARG SCENARIO
COPY feeder_federate /home/feeder_federate
COPY private_models/${SCENARIO}/ /home/feeder_federate/
COPY recorder_federate /home/recorder_federate
COPY sensor_federate /home/sensor_federate
COPY ekf_federate /home/ekf_federate
RUN cp build/gridappsd-state-estimator/state-estimator/bin/* /home/ekf_federate
RUN mkdir -p /home/outputs/${SCENARIO}
COPY workflow_ekf.ipynb /home/workflow_ekf.ipynb
RUN rm -rf /build
COPY generate_ekf.py /home/generate_ekf.py
WORKDIR /home/
RUN python generate_ekf.py ${SCENARIO}
EXPOSE 8888
ENTRYPOINT ["jupyter", "notebook", "--allow-root", "--ip=0.0.0.0", "--no-browser"]