-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile.circuit_simulator
35 lines (23 loc) · 1.03 KB
/
Dockerfile.circuit_simulator
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
FROM debian:stable-20211115-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
gcc bison flex libtool autoconf automake libreadline-dev \
python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=
COPY ./third_party/ngspice-30.tar.gz /tmp/
RUN tar -xvzf /tmp/ngspice-30.tar.gz -C /tmp
COPY ./third_party/ngspice_config/compile_linux.sh /tmp/ngspice_config/compile_linux.sh
RUN cp -f /tmp/ngspice_config/compile_linux.sh /tmp/ngspice-30/ \
&& cd /tmp/ngspice-30 \
&& chmod 700 compile_linux.sh \
&& ./compile_linux.sh 64 \
&& ldconfig
COPY ./circuit_simulator/requirements.txt /srv/circuit_simulator/requirements.txt
RUN cd /srv/circuit_simulator && pip3 install --break-system-packages -r requirements.txt
COPY ./circuit_simulator /srv/circuit_simulator
COPY ./schema /srv/schema
#COPY open_substation.scd /SCD/open_substation.scd
WORKDIR /srv/circuit_simulator
EXPOSE 5010
CMD ["python3","webAPI.py"]