-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathehep.sh
161 lines (125 loc) · 5.46 KB
/
ehep.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/bash
sudo apt update
packages=( "ROOT" "Geant4" "Anaconda" "Git" "CMake" "VSCode")
parentFolder="ehep"
rootFolder="root"
geant4Folder="g4"
downloadsFolder="downloads"
echo 'This script will download essential software for the EHEP 2023 school'
for i in ${packages[@]}; do echo $i; done
echo ${rootFolder}
mkdir -p $parentFolder/{$rootFolder,$rootFolder/build,$rootFolder/install,$geant4Folder,$geant4Folder/build,$geant4Folder/install,$geant4Folder/data,$downloadsFolder}
echo 'installing snapd...'
sudo apt install snapd
echo 'done...'
echo 'installing cmake...'
sudo snap install cmake --classic
echo 'done...'
echo 'installing git...'
sudo snap install git-ubuntu --classic
echo 'done...'
echo 'installing VSCode...'
sudo snap install code --classic
echo 'done...'
cd $parentFolder/$downloadsFolder
echo 'downloading anaconda...'
wget -nc https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
echo 'done...'
echo 'downloading root...'
wget -nc https://root.cern/download/root_v6.28.06.source.tar.gz
tar -xvzf root_v6.28.06.source.tar.gz
mv root-6.28.06 ../$rootFolder/
echo 'done...'
echo 'downloading geant4...'
wget -nc https://gitlab.cern.ch/geant4/geant4/-/archive/v11.1.2/geant4-v11.1.2.tar.gz
tar -xvzf geant4-v11.1.2.tar.gz
mv geant4-v11.1.2 ../$geant4Folder/
echo 'done...'
echo 'installing root dependencies...'
yes | sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxft-dev libxext-dev python libssl-dev libssl-dev
yes | sudo apt-get install gfortran libpcre3-dev xlibmesa-glu-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev python-numpy libxml2-dev libkrb5-dev libgsl0-dev qtwebengine5-dev
echo 'done installing root dependencies...'
echo 'installing geant4 dependencies...'
yes | sudo apt-get install -y libxerces-c-dev
yes | sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5
yes | sudo apt-get install qtbase5-dev
yes | sudo apt-get install qtdeclarative5-dev
yes | sudo apt-get install -y libxmu-dev
echo 'done installing geant4 dependencies...'
echo 'downloading geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4NDL.4.7.tar.gz
tar -xvzf G4NDL.4.7.tar.gz
mv G4NDL4.7 ../$geant4Folder/data
echo 'downloaded 1/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4EMLOW.8.2.tar.gz
tar -xvzf G4EMLOW.8.2.tar.gz
mv G4EMLOW8.2 ../$geant4Folder/data
echo 'downloaded 2/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4PhotonEvaporation.5.7.tar.gz
tar -xvzf G4PhotonEvaporation.5.7.tar.gz
mv PhotonEvaporation5.7 ../$geant4Folder/data
echo 'downloaded 3/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4RadioactiveDecay.5.6.tar.gz
tar -xvzf G4RadioactiveDecay.5.6.tar.gz
mv RadioactiveDecay5.6 ../$geant4Folder/data
echo 'downloaded 4/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4PARTICLEXS.4.0.tar.gz
tar -xvzf G4PARTICLEXS.4.0.tar.gz
mv G4PARTICLEXS4.0 ../$geant4Folder/data
echo 'downloaded 5/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4PII.1.3.tar.gz
tar -xvzf G4PII.1.3.tar.gz
mv G4PII1.3 ../$geant4Folder/data
echo 'downloaded 6/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4RealSurface.2.2.tar.gz
tar -xvzf G4RealSurface.2.2.tar.gz
mv RealSurface2.2 ../$geant4Folder/data
echo 'downloaded 7/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4SAIDDATA.2.0.tar.gz
tar -xvzf G4SAIDDATA.2.0.tar.gz
mv G4SAIDDATA2.0 ../$geant4Folder/data
echo 'downloaded 8/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4ABLA.3.1.tar.gz
tar -xvzf G4ABLA.3.1.tar.gz
mv G4ABLA3.1 ../$geant4Folder/data
echo 'downloaded 9/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4INCL.1.0.tar.gz
tar -xvzf G4INCL.1.0.tar.gz
mv G4INCL1.0 ../$geant4Folder/data
echo 'downloaded 10/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4ENSDFSTATE.2.3.tar.gz
tar -xvzf G4ENSDFSTATE.2.3.tar.gz
mv G4ENSDFSTATE2.3 ../$geant4Folder/data
echo 'downloaded 11/12 geant4 datasets...'
wget -nc https://cern.ch/geant4-data/datasets/G4TENDL.1.4.tar.gz
tar -xvzf G4TENDL.1.4.tar.gz
mv G4TENDL1.4 ../$geant4Folder/data
echo 'downloaded 12/12 geant4 datasets...'
# Enable these to install root and geant4 automatically
# echo 'installing root'
# cd ../root/build
# cmake -DCMAKE_INSTALL_PREFIX=../install ../root-6.28.06/ -Dpyroot=ON -Drootfit=ON -DPython3_EXECUTABLE=/home/codespace/anaconda3/bin/python
# make -j4
# make install
# source ../install/bin/thisroot.sh
# echo 'installing geant4'
# cd ../../g4/build
# cmake -DCMAKE_INSTALL_PREFIX=../install ../geant4-v11.1.2/ -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_DATADIR=../data -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON
# make -j4
# make install
# source ../install/bin/geant4.sh
# enable for conda installs for ehep-2023
# conda install -c anaconda jupyter
# conda install -c conda-forge jupyter-lsp
# conda install -c conda-forge nbdime
# conda install -c conda-forge jupyterlab-git
# conda install -c conda-forge scikit-learn
# conda install -c conda-forge seaborn
# conda install -c conda-forge tensorflow
# conda install -c conda-forge keras
# conda install -c pytorch pytorch
# conda install -c conda-forge dask
# conda install -c conda-forge libxgboost
# conda install -c conda-forge qutip
# conda install -c conda-forge qiskit-terra
# conda install -c conda-forge qiskit-metal