Skip to content

Commit 8754145

Browse files
authored
Docker adaptation for windows (#317)
Docker adaptation for windows, new su2 installation
1 parent 9f4a4d2 commit 8754145

File tree

437 files changed

+5756
-2223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+5756
-2223
lines changed

.github/workflows/integrationtests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,20 @@ jobs:
6262

6363
- name: Install SU2
6464
shell: bash -l {0}
65-
run: installation/Ubuntu/install_su2.sh
65+
run: installation/Ubuntu/install_su2_without_mpi.sh
6666

6767
- name: Install Pentagrow
6868
shell: bash -l {0}
6969
run: installation/Ubuntu/install_pentagrow.sh
70-
70+
71+
- name: Add src to PYTHONPATH
72+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
73+
7174
- name: Run integration tests
7275
shell: bash -l {0}
7376
run: |
7477
source ~/.bashrc
75-
pytest -v ./tests --cov=ceasiompy/ --cov-report xml:coverage.xml -m "not gui"
78+
pytest -v ./tests --cov=ceasiompy --cov-report xml:coverage.xml -m "not gui"
7679
7780
- name: Upload coverage to Codecov
7881
uses: codecov/codecov-action@v3.1.0

.github/workflows/unittests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ jobs:
5656
- name: Install libGLU
5757
run: sudo apt-get install -y libglu1-mesa-dev
5858

59+
- name: Add src to PYTHONPATH
60+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
61+
5962
- name: Run unit tests
6063
shell: bash -l {0}
61-
run: pytest -v ./ceasiompy --cov=ceasiompy/ --cov-report xml:coverage.xml
64+
run:
65+
pytest -v src/ceasiompy --cov=ceasiompy --cov-report xml:coverage.xml
6266

6367
- name: Upload coverage to Codecov
6468
uses: codecov/codecov-action@v3.1.0

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,6 @@ aircraft_loads.csv
185185
/ceasiompy/Database/databases/ceasiompy.db
186186

187187
ceasiompy.cfg
188-
ceasiompy.log
188+
ceasiompy.log
189+
history.csv
190+
docker

CEASIOMpy_docker_Installation

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# With this Dockerfile, you are building a Docker image for
2-
# your LOCAL CEASIOMpy on Ubuntu 22.04, with system dependencies and Miniconda.
2+
# your LOCAL CEASIOMpy on Ubuntu latest, with system dependencies and Miniconda.
33
# Use the commands below to build the Docker image,
44
# and then to run the Docker container.
55

6-
FROM ubuntu:22.04
6+
FROM ubuntu:24.04
77

88
RUN apt-get update
99

10+
RUN apt-get install -y libglu1-mesa-dev
11+
12+
RUN apt update && apt upgrade -y
13+
1014
# Install apt-utils
11-
RUN apt-get install -y apt-utils
15+
RUN apt-get install -y apt-utils
1216

1317
# Install system dependencies
1418
RUN apt-get install -y --no-install-recommends \
15-
git curl wget sudo unzip build-essential libtbb2 libtbb-dev libxrender1 libxcursor1 libxinerama1 libxft2 libxt6 \
16-
libgl1-mesa-glx libglu1-mesa libegl1-mesa libosmesa6 xvfb ca-certificates && \
19+
git curl wget sudo unzip build-essential libtbbmalloc2 libtbb-dev libxrender1 libxcursor1 libxinerama1 libxft2 libxt6 \
20+
libgl1 libglu1-mesa libegl1 libosmesa6 xvfb ca-certificates && \
1721
rm -rf /var/lib/apt/lists/*
1822

1923
# Install Miniconda
@@ -23,20 +27,24 @@ RUN curl -fsSL https://github.com/conda-forge/miniforge/releases/latest/download
2327
rm /tmp/miniforge.sh
2428
ENV PATH=$CONDA_DIR/bin:$PATH
2529

30+
RUN apt-get install -y
31+
2632
# Create the necessary directory structure
2733
WORKDIR /CEASIOMpy/installation/Ubuntu/
2834

29-
# Download only the required installation scripts
30-
RUN wget https://raw.githubusercontent.com/cfsengineering/CEASIOMpy/main/installation/Ubuntu/install_pyavl.sh && \
31-
wget https://raw.githubusercontent.com/cfsengineering/CEASIOMpy/main/installation/Ubuntu/install_su2.sh && \
32-
wget https://raw.githubusercontent.com/cfsengineering/CEASIOMpy/main/installation/Ubuntu/install_pentagrow.sh
35+
# Copy the required installation scripts from local context
36+
COPY ./installation/Ubuntu/install_pyavl.sh .
37+
COPY ./installation/Ubuntu/install_su2_with_mpi.sh .
38+
# COPY installation/Ubuntu/install_pentagrow.sh .
3339

3440
# Make the scripts executable
3541
RUN chmod +x install_*.sh
3642

43+
WORKDIR /CEASIOMpy
44+
3745
# Run the installation scripts
38-
RUN ./install_pyavl.sh
39-
RUN ./install_su2.sh
46+
RUN installation/Ubuntu/install_pyavl.sh
47+
RUN installation/Ubuntu/install_su2_with_mpi.sh
4048

4149
# Go from /CEASIOMpy/INSTALLDIR to /INSTALLDIR
4250
RUN mkdir -p /INSTALLDIR && \
@@ -45,19 +53,15 @@ RUN mkdir -p /INSTALLDIR && \
4553

4654
# Install xvfb and other graphical display dependencies for Ubuntu
4755
RUN apt-get update && apt-get install -y --no-install-recommends \
48-
xvfb libgl1-mesa-glx libglu1-mesa libegl1-mesa libosmesa6 libxt6 && \
56+
xvfb libgl1 libglu1-mesa libegl1 libosmesa6 libxt6 && \
4957
rm -rf /var/lib/apt/lists/*
5058

5159
# Install system dependencies
5260
RUN apt-get update && apt-get install -y --no-install-recommends \
53-
g++ libtbb2 libtbb-dev libxrender1 libxcursor1 libxinerama1 libxft2 libxt6 \
54-
libgl1-mesa-glx libglu1-mesa libegl1-mesa libosmesa6 xvfb && \
61+
g++ libtbbmalloc2 libtbb-dev libxrender1 libxcursor1 libxinerama1 libxft2 libxt6 \
62+
libglu1-mesa libosmesa6 xvfb && \
5563
rm -rf /var/lib/apt/lists/*
5664

57-
# Disable Streamlit watchdog and use polling
58-
#ENV STREAMLIT_GLOBAL_DISABLE_WATCHDOG=1
59-
#ENV WATCHDOG_USE_POLLER=1
60-
6165
# Set the DISPLAY environment variable
6266
ENV DISPLAY=:99
6367
ENV LIBGL_ALWAYS_SOFTWARE=1
@@ -77,7 +81,7 @@ RUN mkdir -p /CEASIOMpy
7781
WORKDIR /CEASIOMpy
7882

7983
# Add software paths to the PATH environment variable
80-
ENV PATH="/CEASIOMpy/INSTALLDIR/SU2-v8.1.0-linux64-mpi/bin:/CEASIOMpy/INSTALLDIR/avl:$PATH"
84+
ENV PATH="/CEASIOMpy/INSTALLDIR/bin:/CEASIOMpy/INSTALLDIR/avl:$PATH"
8185

8286
# Get the required files for installing the conda environment
8387
RUN wget https://raw.githubusercontent.com/cfsengineering/CEASIOMpy/main/setup.py -O /CEASIOMpy/setup.py && \
@@ -94,16 +98,14 @@ COPY src /CEASIOMpy/src
9498
# Create the Conda environment from the environment.yml file
9599
RUN /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh && conda env create -f environment.yml"
96100

97-
# Activate the Conda environment and install CEASIOMpy
98-
RUN /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh && conda activate ceasiompy && pip install -e ."
99-
100101
# Automatically activate the Conda environment in new shells
101102
RUN echo "source $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.bashrc && \
102103
echo "conda activate ceasiompy" >> ~/.bashrc && \
103-
echo "python src/bin/ceasiompy_run --gui" >> ~/.bashrc
104+
echo "pip install -e ." >> ~/.bashrc && \
105+
echo "ceasiompy_run --gui" >> ~/.bashrc
104106

105107
# Move the content of /INSTALLDIR to the mounted /CEASIOMpy/INSTALLDIR folder at runtime
106-
CMD ["/bin/bash", "-c", "rm -rf /CEASIOMpy/INSTALLDIR && mkdir -p /CEASIOMpy/INSTALLDIR && mv /INSTALLDIR/* /CEASIOMpy/INSTALLDIR/ && exec bash"]
108+
# CMD ["/bin/bash", "-c", "rm -rf /CEASIOMpy/INSTALLDIR && mkdir -p /CEASIOMpy/INSTALLDIR && mv /INSTALLDIR/* /CEASIOMpy/INSTALLDIR/ && exec bash"]
107109

108110
# Now you just need click on: Networ URL
109111

ceasiompy/AeroFrame/tests/ToolOutput/.keep

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)