-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
36 lines (33 loc) · 993 Bytes
/
setup.sh
File metadata and controls
36 lines (33 loc) · 993 Bytes
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
#!/bin/bash
WORK_DIR=$(pwd)
if [ ! -f ./software/ML_Tutorial_2025/bin/activate ]; then
cd software
python3 -m venv ML_Tutorial_2025
source ./ML_Tutorial_2025/bin/activate
pip install --upgrade pip
pip install -r pip_requirements.txt
ipython3 kernel install --user --name=ML_Tutorial_2025
cd $WORK_DIR
else
source ./software/ML_Tutorial_2025/bin/activate
fi
if [ ! -d ./software/pythia8312 ]; then
cd software
curl -O https://www.pythia.org/download/pythia83/pythia8312.tgz
tar xfz pythia8312.tgz
rm pythia8312.tgz
cd pythia8312
export CC=gcc
export CXX=g++
./configure --with-python-config=python3-config | tee config.log
CHECK=$(cat config.log | awk 'END{print $3}')
if [[ "$CHECK" == *"PYTHON"* ]]; then
make -j4
else
echo "Pythia cannot find the python installation!"
echo "Please try using a python virtual environment..."
cd $WORK_DIR
exit 1
fi
cd $WORK_DIR
fi