From 14c306818cbbf3de98041124d01dee53b1f2ffba Mon Sep 17 00:00:00 2001 From: Danila Gamkov Date: Wed, 29 Oct 2025 12:15:21 +0300 Subject: [PATCH] add Docker support: docker-compose with local path --- Dockerfile | 34 ++++++++++++++++++++++++++++++++++ README.markdown | 23 +++++++++++++++++++++-- bin/requirements.txt | 2 ++ docker-compose.yml | 16 ++++++++++++++++ file | 1 + 5 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2575167 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# build rust +FROM rust:1.82 AS builder + +WORKDIR /app/asotr_csv + +COPY ./asotr_csv/ /app/asotr_csv/ + +RUN cargo build --release + +# main image: +FROM python:3.10-slim-bookworm + +WORKDIR /app + +COPY ./bin/requirements.txt /app/ + +RUN pip install -r requirements.txt + +COPY ./bin/* /app/bin/ +COPY --from=builder /app/asotr_csv/target/release/asotr_csv /app/bin/asotr_csv + +RUN chmod +x /app/bin/*.sh || true && chmod +x /app/bin/asotr_csv || true + +ENV PYTHONUNBUFFERED=1 +# ENV PATH="/app/bin:${PATH}" + +WORKDIR /app/bin + +# ENTRYPOINT ["/bin/bash"] + + + + + diff --git a/README.markdown b/README.markdown index 4b33d12..5fc2d60 100644 --- a/README.markdown +++ b/README.markdown @@ -11,6 +11,7 @@ This project contains tools for decoding, converting, and visualizing telemetry - **Using the tools** - *Plot all ASOTR data* - *Plot ASOTR data in specified date borders (for MVN reports)* +- **Docker setup** - **Contacts** **Note 1**: \ - path where is mvn_flight scripts is cloned from heagit @@ -126,13 +127,13 @@ csv data will be in directory: Linux: ```bash cd bin -./plot_flight_borders.sh ../data/asotr/ 10.03.2025_00:00:00 23.04.2025_23:59:59 +./plot_flight_borders.sh 10.03.2025_00:00:00 23.04.2025_23:59:59 ``` Windows: ```cmd cd bin -plot_flight_borders.bat ..\data\asotr\ 10.03.2025_00:00:00 23.04.2025_23:59:59 +plot_flight_borders.bat 10.03.2025_00:00:00 23.04.2025_23:59:59 ``` where: @@ -144,5 +145,23 @@ plots with data are in the directory: /plots/reports ``` +### Docker Setup +running a docker image is an alternative way to use `mvn_flight` software. +you just follow steps: +1. download mvn raw data into \, see chapter: `Plot all ASOTR data` +2. compose and run docker image: +```bash +docker compose up -d --build +docker exec -it asotr_container bash +``` +3. Parse all raw data from ASOTR into csv files and plot all csv data: +```bash +./asotr_unzip_plot.sh /mnt/raw_mvn_data/ +``` +4. plot ASOTR data in specified data borders: +./plot_flight_borders.sh 10.03.2025_00:00:00 23.04.2025_23:59:59 + + + ## Contatcs For questions about the program, please contact Danila Gamkov, email: danila_gamkov@cosmos.ru diff --git a/bin/requirements.txt b/bin/requirements.txt index 33e80db..005fcae 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -4,11 +4,13 @@ contourpy==1.3.2 cycler==0.12.1 dates==0.0.1 DateTime==5.5 +et_xmlfile==2.0.0 fonttools==4.60.1 idna==3.11 kiwisolver==1.4.9 matplotlib==3.10.7 numpy==2.2.6 +openpyxl==3.1.5 packaging==25.0 pandas==2.3.3 pathlib==1.0.1 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ea14551 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.9" + +services: + asotr: + build: + context: /home/danila/Danila/work/MVN/Soft/PID/python/ + container_name: asotr_container + image: asotr:latest + working_dir: /app/bin + volumes: + - /home/danila/Danila/work/MVN/Soft/PID/python/data/asotr:/app/data/asotr + - /home/danila/Danila/work/MVN/Soft/PID/python/plots:/app/plots + - /home/danila/Danila/work/MVN/flight/data:/mnt/raw_mvn_data + environment: + - PYTHONUNBUFFERED=1 + command: ["sleep", "infinity"] diff --git a/file b/file new file mode 100644 index 0000000..796a6bb --- /dev/null +++ b/file @@ -0,0 +1 @@ +docker run -it -v /home/danila/Danila/work/MVN/Soft/PID/python/data/asotr:/app/data/asotr -v /home/danila/Danila/work/MVN/Soft/PID/python/plots:/app/plots -v /home/danila/Danila/work/MVN/flight/data:/mnt/host_data asotr:latest bash