forked from deepflameCFD/deepflame-dev
-
Notifications
You must be signed in to change notification settings - Fork 63
70 lines (61 loc) · 2.52 KB
/
CPU_inferencce_validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and Validation with CPU inference
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_validation:
runs-on: self-hosted
if: github.repository_owner == 'deepmodeling'
container:
image: ubuntu:20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y sudo wget unzip git software-properties-common make cmake g++ mpich openmpi-bin libopenmpi-dev libscalapack-mpi-dev vim git-core
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y install openfoam7
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
. ~/miniconda3/etc/profile.d/conda.sh
conda create -n libcantera python=3.8
conda activate libcantera
conda install -c cantera libcantera-devel
conda install pytorch pybind11
conda install --channel https://conda.anaconda.org/zhaofeng-shu33 easydict
git clone https://github.com/deepmodeling/deepflame-dev.git
cd deepflame-dev
- name: build and validation with CPU inference
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
run:
/bin/bash -c " echo $PWD && ls $PWD
&& wget https://github.com/JX278/DeepFlame-flareFGM-table/raw/main/flareFGM_Table_Download.zip
&& unzip flareFGM_Table_Download.zip
&& ls $PWD
&& ls flareFGM_Table_Download
&& cp -r flareFGM_Table_Download/SandiaD/flare.tbl examples/dfLowMachFoam/2DSandiaD_flareFGM/
&& git clone https://github.com/intelligent-algorithm-team/intelligent-combustion.git
&& cp -r intelligent-combustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc
&& . configure.sh --use_pytorch && source ./bashrc && . install.sh
&& cd test && ./Allrun && conda deactivate "
- name: test
run: |
cd test
cmake -B build
cmake --build build
cd build
ctest