add Docker support: docker-compose with local path
This commit is contained in:
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@@ -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"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -11,6 +11,7 @@ This project contains tools for decoding, converting, and visualizing telemetry
|
|||||||
- **Using the tools**
|
- **Using the tools**
|
||||||
- *Plot all ASOTR data*
|
- *Plot all ASOTR data*
|
||||||
- *Plot ASOTR data in specified date borders (for MVN reports)*
|
- *Plot ASOTR data in specified date borders (for MVN reports)*
|
||||||
|
- **Docker setup**
|
||||||
- **Contacts**
|
- **Contacts**
|
||||||
|
|
||||||
**Note 1**: \<PATH_TO_MVN_FLIGHT\> - path where is mvn_flight scripts is cloned from heagit
|
**Note 1**: \<PATH_TO_MVN_FLIGHT\> - path where is mvn_flight scripts is cloned from heagit
|
||||||
@@ -126,13 +127,13 @@ csv data will be in directory:
|
|||||||
Linux:
|
Linux:
|
||||||
```bash
|
```bash
|
||||||
cd bin
|
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:
|
Windows:
|
||||||
```cmd
|
```cmd
|
||||||
cd bin
|
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:
|
where:
|
||||||
@@ -144,5 +145,23 @@ plots with data are in the directory:
|
|||||||
/plots/reports
|
/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 \<PATH_TO_ASOTR_DATA\>, 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
|
## Contatcs
|
||||||
For questions about the program, please contact Danila Gamkov, email: danila_gamkov@cosmos.ru
|
For questions about the program, please contact Danila Gamkov, email: danila_gamkov@cosmos.ru
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ contourpy==1.3.2
|
|||||||
cycler==0.12.1
|
cycler==0.12.1
|
||||||
dates==0.0.1
|
dates==0.0.1
|
||||||
DateTime==5.5
|
DateTime==5.5
|
||||||
|
et_xmlfile==2.0.0
|
||||||
fonttools==4.60.1
|
fonttools==4.60.1
|
||||||
idna==3.11
|
idna==3.11
|
||||||
kiwisolver==1.4.9
|
kiwisolver==1.4.9
|
||||||
matplotlib==3.10.7
|
matplotlib==3.10.7
|
||||||
numpy==2.2.6
|
numpy==2.2.6
|
||||||
|
openpyxl==3.1.5
|
||||||
packaging==25.0
|
packaging==25.0
|
||||||
pandas==2.3.3
|
pandas==2.3.3
|
||||||
pathlib==1.0.1
|
pathlib==1.0.1
|
||||||
|
|||||||
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -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"]
|
||||||
Reference in New Issue
Block a user