-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitial_setup.sh
50 lines (38 loc) · 1.1 KB
/
initial_setup.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
41
42
43
44
45
git clone https://github.com/ecmwf/IonBeam
git clone https://github.com/ecmwf/IonBeam-Deployment
git clone https://github.com/ecmwf/IonBeam-Config
# Setup the cmake bundle
mkdir cmake_bundle
cp CMakeLists.txt cmake_bundle/
cd cmake_bundle
mkdir build
git clone git clone https://github.com/ecmwf/ecbuild
export PATH=$PWD/ecbuild/bin:$PATH
## detect presence of conda or mamba commands
if command -v conda &> /dev/null
then
CONDA_CMD="conda"
elif command -v mamba &> /dev/null
then
CONDA_CMD="mamba"
elif command -v microconda &> /dev/null
then
CONDA_CMD="microconda"
elif command -v micromamba &> /dev/null
then
CONDA_CMD="micromamba"
else
echo "No conda, mamba, microconda, or micromamba command found."
exit 1
fi
$CONDA_CMD create -n ionbeam python=3.12 ipykernel
CONDA_PREFIX=$($CONDA_CMD env list | grep "ionbeam" | awk '{print $2}')
ecbuild --prefix=$CONDA_PREFIX \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_CXX_COMPILER=g++-13 \
-DCMAKE_BUILD_TYPE=Debug \
-S . -B build
cd build
make -j12 && make install
cd IonBeam
$CONDA_CMD run -n ionbeam pip install -e .