-
Notifications
You must be signed in to change notification settings - Fork 71
/
install.sh
executable file
·40 lines (33 loc) · 1.21 KB
/
install.sh
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
#!/bin/sh
if [ -e libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip ]
then
echo "libtorch.zip exist."
else
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip
fi
if [ -d "thirdParty/libtorch" ]; then
echo "libtorch exist."
else
unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip -d thirdParty
fi
cp bashrc.raw bashrc
sed -i s#pwd#$PWD#g ./bashrc
sed -i s#CONDA_PREFIX#$CONDA_PREFIX#g ./bashrc
TORCH_DIR=$PWD/thirdParty/libtorch
sed -i s#TORCH_DIR#$TORCH_DIR#g ./bashrc
if [ -d "src_orig" ]; then
echo "src_orig exist."
else
mkdir -p src_orig/TurbulenceModels
mkdir -p src_orig/thermophysicalModels
mkdir -p src_orig/lagrangian
mkdir -p src_orig/regionModels
cp -r $FOAM_SRC/TurbulenceModels/compressible src_orig/TurbulenceModels
cp -r $FOAM_SRC/thermophysicalModels/basic src_orig/thermophysicalModels
cp -r $FOAM_SRC/thermophysicalModels/thermophysicalProperties src_orig/thermophysicalModels
cp -r $FOAM_SRC/lagrangian/intermediate src_orig/lagrangian
cp -r $FOAM_SRC/lagrangian/turbulence src_orig/lagrangian
cp -r $FOAM_SRC/regionModels/surfaceFilmModels src_orig/regionModels
fi
source ./bashrc
./Allwmake -j