-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (19 loc) · 961 Bytes
/
Dockerfile
File metadata and controls
20 lines (19 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM ubuntu:24.04
RUN apt update && apt upgrade -y
RUN DEBIAN_FRONTEND="noninteractive" apt install -y octave python3-pip nano
RUN apt install -y python3-venv git
COPY requirements.txt /home
RUN cd /home && python3 -m venv venv && . /home/venv/bin/activate && pip install -r /home/requirements.txt
RUN mkdir -p /home/tsapp
COPY tsapp /home/tsapp/tsapp
COPY cli.py /home/tsapp
COPY README.md /home/tsapp
COPY setup.py /home/tsapp
COPY third_party/ /home/tsapp/third_party
RUN cd /home/tsapp && . /home/venv/bin/activate && pip install -e .
RUN apt install -y zip && cd /home/tsapp/third_party/ && unzip matpower-8.0.zip && \
echo "addpath(genpath('/home/tsapp/tsapp/model'));addpath(genpath('/home/tsapp/third_party/matpower-8.0'));" >> ~/.octaverc
RUN chmod +x /home/tsapp/tsapp/federates/run.sh
RUN chmod +x /home/tsapp/tsapp/server.py
RUN chmod +x /home/tsapp/tsapp/server.sh
ENTRYPOINT ["/bin/bash", "-c","/home/tsapp/tsapp/server.sh"]