Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Github runner from Conda to Mamba #266

Merged
merged 30 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
38f3f6a
Fixed typos in linear_goland_flutter.ipynb
ben-l-p Oct 25, 2023
065f71d
Merge branch 'develop' into fix_linear_goland_flutter.ipynb
ben-l-p Oct 27, 2023
b8222dd
Change GitHub workflow to use macOS
ben-l-p Oct 27, 2023
e3f7c3b
Update sharpy_no_test_needed.yaml to use macOS
ben-l-p Oct 27, 2023
f69cf83
Update sharpy_no_test_needed.yaml
ben-l-p Oct 27, 2023
631af35
Update sharpy_no_test_needed.yaml
ben-l-p Oct 27, 2023
456bb83
Update sharpy_tests.yaml
ben-l-p Oct 27, 2023
25756d6
Update docker_build.yaml
ben-l-p Oct 27, 2023
4dcdb04
Update docker_build_test.yaml
ben-l-p Oct 27, 2023
53eceb1
Update sharpy_tests.yaml
ben-l-p Oct 27, 2023
c0cc6b4
Update sharpy_tests.yaml
ben-l-p Oct 27, 2023
d8e5087
Update docker_build.yaml
ben-l-p Oct 30, 2023
060501b
Update docker_build_test.yaml
ben-l-p Oct 30, 2023
758c072
Update sharpy_no_test_needed.yaml
ben-l-p Oct 30, 2023
50f9c9b
Update sharpy_tests.yaml
ben-l-p Oct 30, 2023
438d884
Update sharpy_tests.yaml
ben-l-p Oct 30, 2023
e55b102
Update sharpy_tests.yaml
ben-l-p Oct 30, 2023
db7b747
Update sharpy_tests.yaml
ben-l-p Oct 30, 2023
af44956
Update sharpy_tests.yaml
ben-l-p Oct 31, 2023
4d15e1e
Update sharpy_tests.yaml
ben-l-p Oct 31, 2023
78093c1
Update Dockerfile
ben-l-p Oct 31, 2023
b6cb9de
Update Dockerfile
ben-l-p Oct 31, 2023
2851b56
Update Dockerfile
ben-l-p Oct 31, 2023
c7a378d
Update Dockerfile
ben-l-p Oct 31, 2023
5a1b2da
Update Dockerfile
ben-l-p Oct 31, 2023
ac2f321
Update Dockerfile
ben-l-p Oct 31, 2023
9291783
Update Dockerfile
ben-l-p Oct 31, 2023
a46fe12
Finalise changing Github runner from conda to mamba
ben-l-p Oct 31, 2023
2c94452
Added note for Mamba change
ben-l-p Nov 1, 2023
2ca74b3
Added note about change to Mamba
ben-l-p Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions .github/workflows/sharpy_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,25 @@ jobs:
with:
version: 10
platform: x64
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.9
#Swapped from Conda to Mamba due to Github runner memory constraint
- name: Setup Mamba
uses: mamba-org/setup-micromamba@v1
- name: Pre-Install dependencies
run: |
gfortran --version
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
# wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O mamba.sh
bash mamba.sh -b -p $HOME/mamba
export PATH="$HOME/mamba/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
# conda config --append channels conda-forge
conda update --name base conda
conda list --name base conda
conda init bash
mamba config --set always_yes yes --set changeps1 no
mamba update --name base mamba
mamba list --name base mamba
mamba init bash
hash -r
export QT_QPA_PLATFORM='offscreen'
sudo apt install libeigen3-dev
conda env create -f utils/environment.yml
conda init bash
mamba env create -f utils/environment.yml
mamba init bash
source activate sharpy
git submodule init
git submodule update
Expand Down
35 changes: 18 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM centos:8
ENV PYTHONDONTWRITEBYTECODE=true
ENV BASH_ENV ~/.bashrc
SHELL ["/bin/bash", "-c"]
ENV PATH=${PATH}:/miniconda3/bin
ENV PATH=${PATH}:/mamba/bin

# CENTOS 8 has reached end of life - Not yet an updated Docker base for CentOS stream
# Point to the CentOS 8 vault in order to download dependencies
Expand All @@ -17,31 +17,32 @@ RUN yum groupinstall "Development Tools" -y --nogpgcheck && \
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux && \
yum clean all

# Install miniconda
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda.sh && \
chmod +x /miniconda.sh && \
/miniconda.sh -b -p /miniconda3/ && \
rm /miniconda.sh && hash -r
# Install Mamba
# Swapped from Conda to Mamba due to Github runner memory constraint
RUN wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O /mamba.sh && \
chmod +x /mamba.sh && \
/mamba.sh -b -p /mamba/ && \
rm /mamba.sh && hash -r

ADD / /sharpy_dir/

# Update conda and make it run with no user interaction
# Cleanup conda installation
RUN conda init bash && \
conda config --set always_yes yes --set changeps1 no && \
conda update -q conda && \
conda config --set auto_activate_base false && \
conda env create -f /sharpy_dir/utils/environment.yml && conda clean -afy && \
# Update mamba and make it run with no user interaction
# Cleanup mamba installation
RUN mamba init bash
RUN mamba config --set always_yes yes --set changeps1 no
RUN mamba update -q conda
RUN mamba config --set auto_activate_base false
RUN mamba env create -f /sharpy_dir/utils/environment.yml && mamba clean -afy && \

find /miniconda3/ -follow -type f -name '*.a' -delete && \
find /miniconda3/ -follow -type f -name '*.pyc' -delete && \
find /miniconda3/ -follow -type f -name '*.js.map' -delete
find /mamba/ -follow -type f -name '*.a' -delete && \
find /mamba/ -follow -type f -name '*.pyc' -delete && \
find /mamba/ -follow -type f -name '*.js.map' -delete

#COPY /utils/docker/* /root/
RUN ln -s /sharpy_dir/utils/docker/* /root/

RUN cd sharpy_dir && \
conda activate sharpy && \
mamba activate sharpy && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"* Evaluate the stability of the linearised aeroelastic system at different velocities and plot the results.\n",
"\n",
"## Wing properties\n",
"Span: b=20 ft., chord: c=6 ft., weight: 4 psi., radius of gyration about CG: .25c, elastic axis: 0.33c,, centre of gravity: 0.43c\n",
"Span: b=20 ft., chord: c=6 ft., weight: 4 psi., radius of gyration about CG: .25c, elastic axis: 0.33c, centre of gravity: 0.43c\n",
"\n",
"### References\n",
"\n",
Expand Down Expand Up @@ -79,7 +79,7 @@
"outputs": [],
"source": [
"u_inf = 1.\n",
"alpha_deg = 2. # Define antle of attack for static aeroelastic analsis.\n",
"alpha_deg = 2. # Define angle of attack for static aeroelastic analysis.\n",
"rho = 1.02 # Air density."
]
},
Expand All @@ -100,8 +100,8 @@
"source": [
"M = 16 # Number of chordwise panels\n",
"N = 32 # Number of spanwise panels\n",
"M_star_fact = 10 # Length of the chords in chords.\n",
"num_modes = 8 # Mumber of vibration modes retained in the structural model."
"M_star_fact = 10 # Length of the wake in chords.\n",
"num_modes = 8 # Number of vibration modes retained in the structural model."
]
},
{
Expand Down Expand Up @@ -531,7 +531,7 @@
"source": [
"### Stability \n",
"\n",
"The stability of the Goland wing is now analysed under changing free stream velocity. The flutter modes involves the two lowest frequency modes near the imaginar axis (1st bending and 1st torsion if aerodynamics is removed). The two modes are seen quite separated at 100 m/s. As speed is increased, the damping of the torsion mode decreases until it crosses the imaginary axis onto the right hand plane and flutter begins."
"The stability of the Goland wing is now analysed under changing free stream velocity. The flutter modes involves the two lowest frequency modes near the imaginary axis (1st bending and 1st torsion if aerodynamics is removed). The two modes are seen quite separated at 100 m/s. As speed is increased, the damping of the torsion mode decreases until it crosses the imaginary axis onto the right hand plane and flutter begins."
]
},
{
Expand Down
Loading