Skip to content

Commit 12faa1c

Browse files
Updated local installation instruction (#763)
Merge local intallation instructions set up and tested by Krishnamoorthi Jayakumar
1 parent fef483b commit 12faa1c

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

INSTALL.md

+137
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,142 @@
11
## Installation Guide
22

3+
### **Instruction to install PISA on your local machine**
4+
5+
1. Install the essential dependencies
6+
7+
1. Anaconda (https://www.anaconda.com/)
8+
```bash
9+
wget -nc https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
10+
11+
bash Anaconda3-2023.07-2-Linux-x86_64.sh
12+
```
13+
2. pip (Python package installer)
14+
```bash
15+
conda install pip
16+
```
17+
3. Git
18+
```bash
19+
sudo apt install git
20+
```
21+
22+
Other required libraries (listed below) will be installed automatically during the setup (listed in `setup.py`).
23+
24+
- fast-histogram >= 0.10
25+
- h5py
26+
- iminuit >= 2
27+
- line_profiler
28+
- llvmlite
29+
- matplotlib >= 3.0
30+
- nlopt
31+
- numba >= 0.53
32+
- numpy >=1.17, < 1.23
33+
- pandas
34+
- pint <=0.19
35+
- py-cpuinfo
36+
- pyarrow
37+
- scikit-learn <= 1.1.2
38+
- scipy >= 1.6
39+
- simplejson == 3.18.4
40+
- sympy
41+
- tables
42+
- tabulate
43+
- tqdm
44+
- uncertainties
45+
- kiwisolver >= 1.3.1
46+
- cycler >= 0.10
47+
- packaging >= 20.0
48+
- fonttools >= 4.22.0
49+
- python-dateutil >= 2.7
50+
- pillow >= 8
51+
- contourpy >= 1.0.1
52+
- pyparsing >= 2.3.1
53+
- threadpoolctl >= 2.0.0
54+
- joblib >= 1.0.0
55+
- numexpr
56+
- pytz >= 2020.1
57+
- tzdata >= 2022.1
58+
- mpmath >= 0.19
59+
- blosc2 >= 2.3.0
60+
- future
61+
- ndindex >= 1.4
62+
- msgpack
63+
- six >= 1.5
64+
2. Create conda environment/ virtual environment for the installation of PISA. Assume that the name of the environment is `pisa_env` you can choose your preferred version of python >= 3.7
65+
66+
```bash
67+
conda create -n pisa_env python=3.X
68+
```
69+
70+
2. Activate the newly created environment (You can see the name of your environment in the bash shell after the activation)
71+
72+
```bash
73+
conda activate pisa_env
74+
```
75+
76+
4. Clone the PISA repository from github (https://github.com/icecube/pisa.git)
77+
78+
```bash
79+
git clone https://github.com/icecube/pisa.git
80+
```
81+
82+
5. Install PISA with the following command
83+
84+
```bash
85+
pip install -e pisa
86+
```
87+
88+
Arguments:
89+
90+
* `pisa ` directory of source code
91+
* `-e` (editable) Installs from source located at `$PISA` (Installed directory - pisa) and allows for changes to the source code within to be immediately propagated to your Python installation.
92+
* `-vvv` Be maximally verbose during the install. You'll see lots of messages, including warnings that are irrelevant, but if your installation fails, it's easiest to debug if you use `-vvv`
93+
* `[develop]` Specify optional dependency groups. You can omit any or all of these if your system does not support them or if you do not need them.
94+
95+
### **Test your installation by running a simple script:**
96+
97+
- Activate your python environment (`pisa_env`)
98+
99+
```bash
100+
conda activate pisa_env
101+
```
102+
- Start python interpretator in terminal
103+
104+
```bash
105+
python
106+
```
107+
- Import `Pipline` modelue and `matplotlib.pyplot`
108+
109+
```python
110+
from pisa.core import Pipeline
111+
import matplotlib.pyplot as plt
112+
```
113+
```
114+
<< PISA is running in single precision (FP32) mode; numba is running on CPU (single core) >>
115+
```
116+
- Load an example pipeline
117+
118+
```python
119+
template_maker = Pipeline("settings/pipeline/osc_example.cfg")
120+
```
121+
- Run the pipeline
122+
123+
```python
124+
template_maker.run()
125+
```
126+
- Get the oscillation probabilities as a map
127+
128+
```python
129+
outputs = template_maker.data.get_mapset('prob_mu')
130+
```
131+
- Plot the oscillgram
132+
133+
```python
134+
fig, axes = plt.subplots(figsize=(18, 5), ncols=3)
135+
outputs['nue_cc'].plot(ax=axes[0], cmap='RdYlBu_r', vmin=0, vmax=1);
136+
outputs['numu_cc'].plot(ax=axes[1], cmap='RdYlBu_r', vmin=0, vmax=1);
137+
outputs['nutau_cc'].plot(ax=axes[2], cmap='RdYlBu_r', vmin=0, vmax=1);
138+
```
139+
3140
### Instructions to install PISA on Madison working group servers cobalts (current guide from August 2023):
4141
5142
Assuming you already are in the directory where you want to store fridge/pisa source files and the python virtualenv and build pisa. You also need access to github through your account.

0 commit comments

Comments
 (0)